We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Getting gridview headers to excel sheet when using Cells.ImportGridView


I suspect that I already know the answer to my question, but I just need to make sure that I am not missing something obvious.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Is there anyway to include the column headers from a gridview when importing the GV to excel?


Hans Jørgen


Well, yes, Cells.ImportGridView method is not enhanced much, it will get pure data for records only.
I think you may try importing source DataTable(s) by using some Cells.ImportDataTable() overloads which more enhanced method and you may also get / paste field/column names with data to import data to worksheet, see the document on complete details for importing options Aspose.Cells provides:

Thank you.