I actually did a work around to get data as header using the ExcelMl Export.
if (e.Worksheet.Table.Rows.Count == 1)
RowElement row = new RowElement();
CellElement cell = new CellElement();
string cellText = "This is a Sample cell header";
cell.Data.DataItem = cellText == " " ? "" : cellText;
But now the problem is with the excel filter, which is visible at the first row were I have added the header. Is there a way to set the excel filter at the desired row.
Thanks in advance.