Trying to set the following formula into a cell using the Aspose API:
if(B10="Direct", B16, if(B10="CAPM", (B18+B20*B22)*(1-9999.99)+'FinTax Exp'!B10*(1-'FinTax Exp'!B18)*9999.99, 0))
results in the exception:
"Aspose.Cells.CellsException: Error in Cell: B12-Invalid formula:\"=if(B10=\"Direct\", B16, if(B10=\"CAPM\", (B18+B20*B22)*(1-9999.99)+'FinTax Exp'!B10*(1-'FinTax Exp'!B18)*9999.99, 0))\".\r\n at Aspose.Cells.੬.౭(Cell ஶ)\r\n at Aspose.Cells.Cell.set_Formula(String value)\r\n at Modelsheet.AsposeGenerator.AsposeGenerator.SetFormula(Object cell, String formula) in D:\\Devo\\ModelSheet\\Model\\Spreadsheet\\Aspose.cs:line 169\r\n at ModelSheet.Model.Spreadsheet.BasicExcelGenerator.OutputCell(GeneratorContext gcontext, Object contents, ITableSpec table, Int32 nrow, Int32 ncol) in D:\\Devo\\ModelSheet\\Model\\Spreadsheet\\ExcelBase.cs:line 316"
If I copy the formula to the clipboard and paste it into Excel it works fine.
Thanks,
--Howard