Sir I am trying to evaluate Aspose.Cells for NET 4.8.2, in order to propose to a multi site client.
Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thank you for considering Aspose.
Well, there is some differences between the formula and values in your code and template file. Like there is no formula on cell “B92” (in your template file the formula is at “B7”). Also, the value of “C7” is not used in the formula of “B7”, so that means if you even change the value of “C7”, it will not affect the formula result of “B7”. If you have some different requirements, please explain it in detail and we will check it soon. Also, I have made the changes to your code as per the above details and it works fine.
Dim wb As Workbook = New Workbook()
'Dim fstream As FileStream = New FileStream("f:\test1.xls", FileMode.Open)
'Opening the Excel file through the file stream
'wb.Open(fstream, FileFormatType.Excel2003, "abc")
wb.Open("d:\test1.xls", FileFormatType.Excel97To2003)
wb.Worksheets(0).Cells("C2").PutValue(0)
wb.CalculateFormula()
MsgBox(wb.Worksheets(0).Cells("B7").Value.ToString())
wb.Worksheets(0).Cells("C2").PutValue(7)
wb.CalculateFormula()
MsgBox(wb.Worksheets(0).Cells("B7").Value.ToString())
Please feel free to contact us in case you have any further query. We will be happy to help you out.
Thank You & Best Regards,
Sir,
Hi,
Please try the attached latest version/fix v4.9.1.3.
I have tested your scenario with it using your template file, it works fine.
Sample code:
Dim wb As New Workbook()
'Dim fstream As FileStream = New FileStream(“f:\test1.xls”, FileMode.Open)
'Opening the Excel file through the file stream
'wb.Open(fstream, FileFormatType.Excel2003, “abc”)
wb.Open(“e:\test\test1.xls”, FileFormatType.Excel97To2003)
MessageBox.Show(wb.Worksheets(0).Cells(“C7”).Value.ToString())//0
MessageBox.Show(wb.Worksheets(0).Cells(“C92”).Value.ToString())//-533
wb.Worksheets(0).Cells(“C7”).PutValue(3)
wb.CalculateFormula()
MessageBox.Show(wb.Worksheets(0).Cells(“C7”).Value.ToString()) //3
MessageBox.Show(wb.Worksheets(0).Cells(“C92”).Value.ToString()) //-685.
wb.Save(“e:\test\outtest1.xls”)
Thank you.