Calculation error in file while using string instead of number with Aspose.Cells for .NET in C#

Hi,

i read an excel with Aspose and get another result as when i open it in Excel.

My Code:

Workbook xls = new Workbook(“DC2_v9.xls”);
MessageBox.Show(xls.Worksheets[0].Cells[1].Value.ToString());

Aspose result: 8851,735854
Excel result: 88,5

I believe the cell format in the second sheet is the problem but
why can Excel handle it and Aspose not ?

Kindly regards,

Guido

Hi Guido,


Thanks for your inquiry. As your request is related to Aspose.Cells, I will move your request in Aspose.Cells forum. My colleagues from Aspose.Cells component team will answer you shortly.

Best Regards,

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

Please download and try the latest version:
Aspose.Cells for .NET (Latest Version)
and let me know your feedback.

Please use Workbook.CalculateFormula() before checking the values.

Below is the code example.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\DC2_V9.xls”;


Workbook xls = new Workbook(filePath);

xls.CalculateFormula();

MessageBox.Show(xls.Worksheets[0].Cells[1].Value.ToString());


Hi,

Please enter the number value to the cells in the worksheet “BD1”, the current value type is string in the worksheet “BD1”.

There is an issue in converting string value with local settings to a number value in Aspose.Cells. We will try to support it later.