Hi Shakeel,
It's getting better, but unfortunately I found still a rounding problem. The value 0.415 is after rounding 0.41 instead of 0.42. This happens in one of our excel-sheets. I have tested this with version 6.0.0.0 and 6.0.0.2 of Aspose.Cells. The problem happens in version 6.0.0.2.
For reproduction you can use the excel-file attached and code below. What you see is that K32 (see variable valueK32) contains the number 0.410 instead of 0.420.
FileStream stream = File.Open(@"E:\rekenschemaGVW_2010v1_0310.xlsx", FileMode.Open);
<span style="color: rgb(43, 145, 175);">Workbook</span> workbook = <span style="color: blue;">new</span> <span style="color: rgb(43, 145, 175);">Workbook</span>(stream);
#region
Worksheet invoerWorksheet = workbook.Worksheets[“invoer”];
invoerWorksheet.Cells[“B2”].PutValue(20100101);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B7"</span>].PutValue(1989);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B8"</span>].PutValue(1989);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B9"</span>].PutValue(1989);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B10"</span>].PutValue(1989);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B17"</span>].PutValue(1825);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B19"</span>].PutValue(1825);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B21"</span>].PutValue(<span style="color: rgb(163, 21, 21);">"m2"</span>);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B22"</span>].PutValue(1087);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B23"</span>].PutValue(19);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B25"</span>].PutValue(1);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B26"</span>].PutValue(1);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B27"</span>].PutValue(-25);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B28"</span>].PutValue(<span style="color: rgb(163, 21, 21);">"staal"</span>);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B29"</span>].PutValue(50);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B30"</span>].PutValue(30);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B31"</span>].PutValue(20);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B32"</span>].PutValue(27);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B33"</span>].PutValue(22);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B34"</span>].PutValue(17);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B35"</span>].PutValue(47);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B36"</span>].PutValue(27);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B37"</span>].PutValue(17);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B38"</span>].PutValue(27);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B39"</span>].PutValue(7);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B40"</span>].PutValue(5);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B41"</span>].PutValue(1);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B42"</span>].PutValue(1);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B43"</span>].PutValue(1);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B44"</span>].PutValue(543.5);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B45"</span>].PutValue(326.1);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B46"</span>].PutValue(217.4);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B48"</span>].PutValue(3000);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B50"</span>].PutValue(1);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B51"</span>].PutValue(1);
invoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B52"</span>].PutValue(1);
workbook.CalculateFormula();
<span style="color: rgb(43, 145, 175);">Worksheet</span> uitvoerWorksheet = workbook.Worksheets[<span style="color: rgb(163, 21, 21);">"uitvoer"</span>];
<span style="color: blue;">string</span> valueB23 = uitvoerWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"B23"</span>].StringValue;
<span style="color: rgb(43, 145, 175);">Worksheet</span> rekenbladWorksheet = workbook.Worksheets[<span style="color: rgb(163, 21, 21);">"rekenblad"</span>];
<span style="color: blue;">string</span> valueT43 = rekenbladWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"T43"</span>].StringValue;
<span style="color: blue;">string</span> valueS43 = rekenbladWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"S43"</span>].StringValue;
<span style="color: blue;">string</span> valueK32 = rekenbladWorksheet.Cells[<span style="color: rgb(163, 21, 21);">"K32"</span>].StringValue;
#endregion
Please use the other reproduction tests in this thread for testing the other cases I submitted when fixing this problem.
Kind regards,
Jan Kok