Free Support Forum - aspose.com

Formula =cell - cell - cell error

When processing a template, if I set a cell to contain the formula =a1-a2-a3 in the resulting spreadsheet excel treats it as =a1-(a2-a3) which is incorrect. I cannot reproduce this behavior without using Aspose.Cells to generate the file. The same file behaves the same way in Excel 11.8146.8132 and 12.0.6024.5000.

I've attached a sample file and sample code.

Thanks,
Josh Rozier



Dim x As New Aspose.Cells.Workbook
x.Open("C:\test\book3.xls")
x.Worksheets(0).Cells(3, 0).Formula = "=a1-a2-a3"
x.Save("C:\test\book4.xls")

I’m using Aspose.Cells (4.4.0.21)

Hi,

Thanks for considering Aspose.

Could you try the latest version (4.4.1) as I used your template file with code and the output file is fine. It does show the formula as "=A1-A2-A3" which is fine in MS Excel.

Attached is the output file using your code and template file.

Thank you.

This works, thanks.