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 : Nov 16th 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:

Created:

Updated:

Platform:

Replies:

132194 Aug 18,2017 08:26 PM UTC Aug 22,2017 12:59 PM UTC ASP.NET MVC 3
loading
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:



Thanks

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. 
 
Regards, 
Abirami. 



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

Ok,

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?


Thanks

Eric



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.  
 
Regards, 
Mathu Mohan V A 


CONFIRMATION

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.

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

;