From version 25.x.x.x and above (newer) pie charts generates chart exception. When opening .xlsx template with pie charts in it and trying to save it, exception is thrown. Whats more, it seems that 3D charts also wont render correctly - narrow columns. Version 'till 24.12.0.0
work fine.
It appears you are encountering issues with pie charts and 3D charts in Aspose.Cells version 25.x.x and above, while they function correctly in version 24.12.0.0. This may be due to changes or bugs introduced in the newer version.
To troubleshoot this issue, consider the following steps:
-
Check for Updates: Verify that you are using the latest version of Aspose.Cells, as the issue may have been resolved in a subsequent release.
-
Review Release Notes: Examine the release notes for versions 25.x.x and above for any breaking changes or updates that could impact chart rendering.
-
Provide Sample Code: If possible, share a minimal code snippet that reproduces the issue. This will assist in diagnosing the problem more effectively.
-
Contact Support: If the issue persists, consider reaching out to Aspose support with your specific use case and any error messages you are encountering.
For further assistance, consult the Aspose.Cells documentation for guidance on chart rendering and related topics.
@marcinignatiuk
Would you like to provide your sample file and runnable test code? We will check it soon.
Are you using Aspose.Cells.GridJs, Aspose.Cells.GridWeb, Aspose.Cells.GridDesktop or Aspose.Cells library, please confirm? Also, as requested earlier, please zip and attach the template Excel file and share the code snippet.
- As I mentioned every version newer than 24.x.x.x generates error.
- I’ve checked release notes and since jump from 24.x.x.x to 25.1.1 results with an exception I assume some of this bug/fixes could be the cause of the problem, though I cannot find a way to look through these issues:
CELLSNET-57486 Shape to image error when saving file to pdf Bug
CELLSNET-57573 Font name in the generated pdf is garbled while converting workbook to pdf Bug
CELLSNET-57487 Charts overlap with the tables when saving file bytes to xlsx Bug
CELLSNET-57548 Font size and font style getting changed after saving Excel file Bug
CELLSNET-57549 The generated xlsx file is corrupted after converting an ods file Bug
- Unfortunately I cannot provide sample code as Its part of the business solution. In short its just opening excel template with charts,data feed and export to pdf.
- I will if Free Support wont work.
@marcinignatiuk
Thank you for your feedback. We have fixed all the issues you listed. With the iteration of subsequent new versions, we not only fixed the issues discovered later, but also enhanced the existing features.
We recommend you to kindly try using our latest version: Aspose.Cells for .NET 25.9.
If you still find the issue, kindly do share your template Excel file to reproduce the issue on our end, we will check it soon.
Latest version still generates problems. Ill try to share some samples soon.
@marcinignatiuk
Please take your time to share sample files and runnable test code. We will check it soon.
Ok, I think I know whats wrong. Pie chart Im trying to export uses data series with data exceeding over 48 decimal places (0,6+E54) and when trying to save it as Pdf error occurs:
Aspose.Cells.CellsException: Chart/Picture to image Error!
code used to save:
using (var fs = new FileStream(GetTempReportPath(guid.ToString()), FileMode.CreateNew))
{
workbook.Save(fs, SaveFormat.Pdf);
}
When saving as Xlsx there is no problem with such numbers.
Aspose.Cells 24.12.x.x does not have this problem and code above works, only versions from 25.x.x.x generates error.
@marcinignatiuk
Thank you for your feedback. After testing, we found that it is not possible to input numbers with more than 48 decimal places in Excel, and even formatting cannot complete the 48 decimal places format.
If copied and used directly (0,6+E54), formatting in Excel will only display 30 decimal places.
By testing the following sample code on the latest version v25.9, we can export the PDF normally without any abnormalities. Please refer to the attachment.
test.zip (23.7 KB)
Workbook wb = new Workbook(filePath + "test.xlsx");
wb.Save(filePath + "result.pdf");
Would you like to share your sample file? We will check it soon.
Put large values within code instead of xlsx template
cell.PutValue(<0,6+E54 or sth>);
and save using
workbook.Save(fs, SaveFormat.Pdf);
not
wb.Save(filePath + “result.pdf”);
@marcinignatiuk
We can reproduce the issue by testing on the latest version v25.9 using the following sample code. Chart/Picture to image error when saving file to pdf.
Workbook wb = new Workbook(filePath + "test.xlsx");
Cell cell = wb.Worksheets[0].Cells["B3"];
cell.PutValue(0.0000000000000000000000000000000000000000000000000000000000000000006);
FileStream fs = new FileStream(filePath + "result_out.pdf", FileMode.Create);
wb.Save(fs, SaveFormat.Pdf);
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSNET-59083
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Thanks and good luck
@marcinignatiuk
Thank you for your feedback. You are welcome. We will notify you promptly once there are any updates.