ROUND() Problem in Aspose


#1

Hello,

I'm actuallly using Aspose.Excel to process generated Excel files and import the value contained in database. Those Excel files contain formulas.

I have noticed a problem with the ROUND() Function which doesn't return the same value in Excel and in Aspose.Excel.

For example in the Excel file i have the following formula in Cell 0,0 : "=ROUND(42.80;0)". Excel diplays 43

When i open this Excel file with aspose and that i run following code, it will diplay 42 :

excel.CalculateFormula(true) ;
Worksheet ws = excel.Worksheets[0] ;
MessageBox.Show("Value : " + ws.Cells[0, 0].Value) ;

Am I doing something wrong ?

Thank you


#2

It may be a problem in old version. Please try this attached latest version.


#3

Thank you for your response,

I tried with the linked version of Aspose.Cells and it works correctly


#4

I thought problem was solved but in fact it is only partially solved in the latest Aspose.Cells version, the ROUND() Function still returns wrong result when rounding negative numbers.

ROUND(-4.92;0) returns -5 in Excel but it returns -4 in Aspose.

This problem is actually corrupting datas, it would be nice if it could be corrected asap.

Thank you


#5

Yes, negative number does cause problem. I fixed it in the attached version. Please try it.


#6

Works like a charm, thank you for your reactivity

Regards

Gilles Faessler