Excel to PDF conversion crashes if Excel has Pie Chart with no data

Hello, I wish to report an edge-case bug.


I am using the latest NuGet packages (version 20.2.0.39 of Syncfusion.ExcelToPdfConverter.Wpf and Syncfusion.ExcelChartToImageConverter.WPF) to convert Excel to PDF, including converting any charts to an image.

This all works fine unless the Excel spreadsheet contains a Pie chart of some kind *without any data* - this results in a exception deep in the Windows libraries.

Note that this code is running on an up-to-date Windows 2019 Server within an ASP.NET Core application. We are using an up-to-date Office 365 version of Excel.

Of course, we wouldn't expect charts without data in our Excel spreadsheets, but it can happen. I have been able to work round this by programmatically removing Pie charts without any data from the in-memory spreadsheet just before conversion to PDF, but it would be better if the Syncfusion library did not crash :-) Perhaps such Pie charts could be omitted from the PDF, or just show a blank chart (like what happens with other chart types without any data).

Note that this problem does not happen with Word and PowerPoint, i.e. Pie charts with no data are correctly rendered as empty charts (whitespace image) in the PDF.

Regards,
Ian


5 Replies

RS Ramya Sivakumar Syncfusion Team July 27, 2022 11:44 AM UTC

Hi Ian Morrision,


Greetings from Syncfusion.


We are unable to reproduce the issue at our end. We have shared a sample that we tried at our end, and it can be downloaded from the below link.


Sample link - https://www.syncfusion.com/downloads/support/directtrac/general/ze/F-1764491759076758


We request you modify this sample to reproduce the issue and share us along with issue reproducing input documents. It will help us to proceed further and provide you with a solution at the earliest.


Regards,

Ramya.




IM Ian Morrision July 28, 2022 02:44 PM UTC

Hello, I have not been able to reproduce this issue with your sample solution. I have even tried with new spreadsheets I have created with different versions of Excel. Strange that I cannot reproduce this. Note that the application where I see this behaviour targets .NET 6, whereas your sample solution targets .NET Framework 4.7.2, so perhaps that is where the issue lies.



RS Ramya Sivakumar Syncfusion Team July 29, 2022 10:28 AM UTC

Hi Ian Morrision,


Thanks for the update. We are unable to reproduce the issue in the .NET 6 also. So kindly share the issue reproducing sample along with the issue reproducing input document. Otherwise, We can have a web meeting to look into the issue. Please let us know your availability and time zone to schedule a web session.


Regards,

Ramya.



IM Ian Morrision July 29, 2022 10:44 AM UTC

I am now unable to reproduce this problem - very odd, as it was definitely crashing out badly previously! It must have been a transient issue with my environment (which has since been rebooted). Apologies... please close this ticket.


Thank you for your excellent support.


Regards,

Ian



RS Ramya Sivakumar Syncfusion Team August 1, 2022 11:03 AM UTC

Hi Ian Morrision,


You’re welcome.


Thanks for the update. As per your information, we will close this ticket.


Regards,

Ramya.



Loader.
Up arrow icon