Dear Sir,
I’m using version 7.2.2. I create a new sheet from a template by copying the sheet and put value to cells. I found that saving as xls/xlsx work properly, but saving as html not function properly for the formula on cells.
for example, I put a formula on A3, say that A3 = SUM(A1:A2) on the template.
I put value on A1 & A2, then save the workbook to xlsx and html.
The xlsx evaluates the formula, but the html doesn’t. ( html shows that A3 = 0, but the xlsx A3=A1+A2)
Any idea ??
Regards,
Agi
Hi,
Thanks for your posting and using Aspose.Cells for .NET.
Please use workbook.CalculateFormula() before saving to html format and see if it resolves your problem.
Please download and use the latest version:
Aspose.Cells
for .NET v7.2.2.1
Please see the following code and the output html file.
C#
Workbook workbook =
new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
worksheet.Cells[“A1”].PutValue(10);
worksheet.Cells[“A2”].PutValue(20);
worksheet.Cells[“A3”].Formula = “Sum(A1:A2)”;
workbook.CalculateFormula();
workbook.Save(filePath + “.
out.html”);
Screenshot: