Hi Dahrmendr,
I have a gridview which i was exporting to XLS which i set up using the link below
https://www.aspsnippets.com/Articles/Export-GridView-To-Word-Excel-PDF-CSV-Formats-in-ASP.Net.aspx
when i did this i used the folowing code to modify the headers and remove some columns by adding the code shown below;
row.Visible = True
row.BackColor = System.Drawing.Color.White
row.Cells(0).text = "-"
row.Cells(1).Visible = False
row.Cells(4).Visible = False
row.Cells(5).Visible = False
row.Cells(6).Visible = False
GridView1.HeaderRow.Cells(0).Text = "SpecimenIdentifier"
GridView1.HeaderRow.Cells(1).Text = "TestIdentifier"
GridView1.HeaderRow.Cells(2).Visible = False
GridView1.HeaderRow.Cells(3).Visible = False
GridView1.HeaderRow.Cells(4).Visible = False
GridView1.HeaderRow.Cells(5).Visible = False
GridView1.HeaderRow.Cells(6).Visible = False
I then resulted in instaling the ClosedXML.Excel inline with the expample provided in the link;
https://www.aspsnippets.com/Articles/Solution-ASPNet-GridView-Export-to-Excel-The-file-you-are-trying-to-open-is-in-a-different-format-than-specified-by-the-file-extension.aspx
but now i'm not sure how to modify the headers and cells. i hope this is enough information. thank you for the prompt responce