- Home
- Forum
- ASP.NET MVC
- Exporting Chart - include series names as column headers
Exporting Chart - include series names as column headers
Attachment: ResourceAssignment_72e4584a.zip
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
|
//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); |
- 3 Replies
- 3 Participants
-
EO Eric Outley
- Aug 18, 2017 08:26 PM UTC
- Aug 22, 2017 12:59 PM UTC