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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Exporting Chart - include series names as column headers

Thread ID:





132194 Aug 18,2017 08:26 PM UTC Aug 22,2017 12:59 PM UTC ASP.NET MVC 3
Tags: XlsIO
Eric Outley
Asked On August 18, 2017 08:27 PM UTC

In the Excel export of a chart, is there any way to set the column names to be the series names.  See below:


Attachment: ResourceAssignment_72e4584a.zip

Abirami Varadharajan [Syncfusion]
Replied On August 21, 2017 06:16 AM UTC

Hi Eric, 
Thank you for contacting Syncfusion support. 
Yes, we can set the column names as series names. We have prepared sample for the same and shared for your reference which can be downloaded from the following link. 
Kindly refer and let us know that your requirement is fulfilled. 

Eric Outley
Replied On August 21, 2017 02:36 PM UTC


So I having a few issues with the sample.  You have me opening a excel file that doesn't exist.  I'm actually creating the Excel file dynamically in code on the server.  So I tried exporting out the file first using:

                ExcelEngine excelEngine = new ExcelEngine();

                ExcelExport exp = new ExcelExport();

                IApplication application = excelEngine.Excel;

                IWorkbook workbook = application.Workbooks.Create(1);

                workbook = exp.Export(obj, data, "ResourceAssignment.xlsx", ExcelVersion.Excel2013, false, null, null);

               IWorksheet sheet = workbook.Worksheets[0]; 

The workbook comes back as null, but the page is asking me to save the Excel file.  It is exported and the code stops.

How do I get the workbook in to an object, so I can change the headers of the column?



Mathu Mohan Vijayakumar [Syncfusion]
Replied On August 22, 2017 12:59 PM UTC

Hi Eric,  
It is a usage level issue. We request you to use the following overloaded method to get the workbook object on exporting Excel from Grid.  
//Return the workbook object on exporting the Excel file from Grid 
workbook = exp.Export(obj, data, "output.xlsx", ExcelVersion.Excel2013, false, false, "falt-safron", false); 
We have prepared sample to export the data from Grid and add the chart in the returned workbook object. The sample can be downloaded from the following link.  
Sample Link: 
Kindly refer the sample and let us know that your requirement is fulfilled.  
Mathu Mohan V A 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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