Spire.XLS for .NET is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Thu Sep 20, 2018 7:05 am

Dear support:

I'm trying to convert a Excel chart to image with the following codes.
Code: Select all
Workbook workbook = new Workbook();
workbook.LoadFromFile("test.xlsx");
Worksheet sheet = workbook.Worksheets[0];
if (sheet.Charts.Count > 0)
{
    Image[] imgs = workbook.SaveChartAsImage(sheet);
}

It throw a NullReferenceException on this line: Image[] imgs = workbook.SaveChartAsImage(sheet),but sheet and workbook are not null.
please help,thank you.

demonica
 
Posts: 1
Joined: Thu Sep 20, 2018 6:47 am

Thu Sep 20, 2018 7:32 am

Hello,

Thanks for your inquiry.
If you were using an old version, I suggest that you upgrade to the latest commercial version (Spire.XLS Pack(Hotfix) Version:8.9.3) to have a test. If the issue still troubles you, please provide your Excel file so that we can do further investigations. You could send it to our email (support@e-iceblue.com).

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1000
Joined: Tue Sep 27, 2016 1:06 am

Wed Sep 26, 2018 7:32 am

Hello,

Greetings from E-iceblue.
How is your issue going?
Any feedback will be greatly appreciated.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1000
Joined: Tue Sep 27, 2016 1:06 am

Return to Spire.XLS