Hi Support,
Hi,
Thanks for your posting and using Aspose.Cells.
Please download and try the latest version: Aspose.Cells
for .NET v8.4.2.5 and see if it fixes your issue.
If your problem still occurs, then please provide us your sample code replicating this issue with the latest version and also provide us a screenshot that highlights the problematic cells so that we could investigate this issue further at our end.
We will look into it and update you asap.
Hi Support,
Hi Henry,
Thanks for your feedback and using Aspose.Cells.
Please provide us your sample code and screenshot showing the cells with wrong calculated values.
I have generated the attached pdf with the latest version after recalculating the workbook. Please download it and see if you see any problematic cells, then highlight those cells in a screenshot.
C#
string filePath = @“D:\Downloads\ReadValueNotCorrect.xlsx”;
Workbook workbook = new Workbook(filePath);
workbook.CalculateFormula();
PdfSaveOptions opts = new PdfSaveOptions();
opts.OnePagePerSheet = true;
workbook.Save(filePath + “.out.pdf”, opts);
Hi Faiz,
Hi Henry,
Thanks for your explanation and using Aspose.Cells.
Please let me know the code you are using to delete the cell values from A2:DR2. I have tested it with the following code after deleting the contents of this range but it generated the correct results. I have attached the generated pdf for your reference.
C#
string filePath = @“F:\Shak-Data-RW\Downloads\ReadValueNotCorrect.xlsx”;
Workbook workbook = new Workbook(filePath);
Worksheet worksheet = workbook.Worksheets[“Working”];
//Delete values of A2:DR2
CellArea area = CellArea.CreateCellArea(“A2”, “DR2”);
worksheet.Cells.ClearRange(area);
workbook.CalculateFormula();
PdfSaveOptions opts = new PdfSaveOptions();
opts.OnePagePerSheet = true;
workbook.Save(filePath + “.out.pdf”, opts);
Hi faiz,
Hi Faiz,
Hi Henry,
Thanks for your posting and using Aspose.Cells.
I am unable to spot any problem with those columns, the results exactly match with Aspose.Cells generated results.
I have attached the screenshots showing the results of excel and output pdf which was generated after calculation.
Could you please highlight the cells with wrong calculated values in a screenshot so that we could easily spot the problem and fix it. Thanks for your cooperation.
Hi faiz,
Hi Fiaiz,
Hi Henry,hrbusiness:Hi Fiaiz,I recreated a new sample file for you to investigate.Best RegardsHenry Lim
Thanks for your posting and using Aspose.Cells.
If you check your screenshot, you will see Aspose value matches with Microsoft Excel but your green colored Excel value does not match with Microsoft Excel.
For example see cell EF1
Its Microsoft Excel value is
TTC-Mean
76,197
vs
51,756
And your green color screenshot shows, its Aspose value is same i.e
TTC-Mean
76,197
vs
51,756
However, its Excel value is wrong i.e
TTC-Mean
76,156
vs
51,756
Please compare others values. Aspose values matches with Microsoft Excel values but your green colored Excel values do not match with Microsoft Excel values.
I have attached the screenshot for your reference.
Hi Faiz,
Hi Henry,
Thanks for your posting and using Aspose.Cells.
I have looked into this issue further and tested this issue with the following sample code using the latest version: Aspose.Cells
for .NET v8.4.2.5 and found the latest version is calculating the cells values correctly.
Either, you are not using latest version or there is some error in your code. Please provide us your sample console application project replicating this issue with the latest version so that we could investigate and fix this issue.
I have attached the output pdf generated with the code and screenshot comparing Excel and PDF values for a reference.
C#
string filePath = @“F:\Shak-Data-RW\Downloads\ReadValueNotCorrect2.xlsx”;
Workbook workbook = new Workbook(filePath);
Worksheet worksheet = workbook.Worksheets[“Working”];
//Delete values of A2:DR2
CellArea area = CellArea.CreateCellArea(“A2”, “DR2”);
for (int c = area.StartColumn; c <= area.EndColumn; c++)
{
worksheet.Cells[area.StartRow, c].Value = DBNull.Value;
}
workbook.CalculateFormula();
PdfSaveOptions opts = new PdfSaveOptions();
opts.OnePagePerSheet = true;
workbook.Save(filePath + “.out.pdf”, opts);
Hi faiz,
Hi,
Thanks for your posting and using Aspose.Cells.
I am unable to run your code because it is not runnable and gives compile time errors. I have attached the screenshot showing the errors.
Please provide us your runnable sample console application project that could help us replicate this issue at our end.
Please also download and try the latest version: Aspose.Cells
for .NET v8.4.2.7 and see if it makes any difference.
hi Fiaz,
Hi Henry,
Thanks for your sample web application project and using Aspose.Cells.
We were able to observe the differences of Aspose.Cells and Excel values after executing the TestPositionReport.aspx page. However, this problem might be related to your excel component that reads the values and not related to Aspose.Cells.
We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as
- CELLSNET-43724 - Values are not correct when data changes
Hi,
The issues you have found earlier (filed as CELLSNET-43724) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.