We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to convert the chart created from external data range using XlsIO?

This article explains how to convert chart created with external data range using XlsIO in C#/VB.NET.

What is chart with external data?

The chart created with the data from an external workbook is called chart with external data. The chart from the current worksheet holds a chart cache to maintain the chart data. For conversion, ExcelChartToImageConverter uses that cache information when the chart is created with external data range. By default, XlsIO does not parse the chart cache information. So, we must set the IsChartCacheEnabled property to true in IApplication to parse that cache information before opening the excel file. After parsing the cache information, it is used for converting the chart properly.

 

To convert chart created with external data range, you need to follow the below steps.

Steps to convert chart with external data range

  1. Enable the chart cache parsing to parse the data from the chart.

 

  1. Instantiate ChartToImageConverter in IApplication and set the scaling mode for the chart while conversion.

 

  1. Convert the workbook to PDF and saving the pdf file.

 

To know more about chart conversion using XlsIO, please refer the documentation.

 

Download input file

Download Complete sample

The following C#/VB.NET complete code snippet shows how to convert chart with external data range.

 

 

The below screenshot shows the output chart with external data range after conversion.

Article ID: Published Date: Last Revised Date: Platform: Control:
8412 02/14/2018 02/14/2018 Windows Forms XlsIO
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon