I'm having problems applying a formula to a cell when the formula contains the if function. Example:
dim f as Formula = Formula.Parse("=if(1>1, 0, 1)", CellReferenceMode.R1C1)
f.ApplyTo(worksheet.rows(1).cells(1))
Everything complies and runs fine. But when I open the excel file the cell value is #N/A. I'm using Infragistics35.WebUI.Excel.v9.2. Is there something wrong with my formula or the assembly?
Thanks,
Joe
Yes it works in 2007 but when you open the excel file it gives a warning of file being in a different format as the file is saved as an .xls extension by default. Is there a way to change the extension of the file to xlsx.
Hi Joe,
I tried this out and I get the same results. It appears to only happen when you specify the third parameter to the 'if' function. If you do "=if(1>1, 0)", it works okay. Of course, that makes the 'if' function pretty limited.
It also looks like this only happens if you export to the older Excel format. If you export to Excel2007 format, it works correctly.
I'm going to forward this thread over to Infragistics Developer Support so they can write it up for development review and get this fixed.