I\'m exporting an ASP.NET gridview to Excel using the following function. The formatting is working really well, except I need to freeze the header row in Excel on the expo
Modify the WorksheetOption element to something like the following:
1
1
2
3
2
False
False
False
Notice the FreezePanes element. I cut this out of a spreadsheet that I had saved as HTML with the first row frozen. When this file is opened with Excel, the first row is frozen.
EDIT: To have the header row print on each page, you will need something like this:
Print_Area
1
=Sheet1!$A$2:$F$97
Print_Titles
1
=Sheet1!$1:$1
You will need to modify the values in the formula dynamically for your data.