O
Oleg
I need to export data in a GridView to excel without having office installed
on the server. I need to do this with both freezing a row so it will show on
every page when printed. This can be accomplished in excel 2007 using "Print
Titles". The other thing that's required is that grouping(outlining ) is
enabled with multiple levels. This can be accomplished in excel 2007 by going
into the "Data" tab and clicking "Group".
I have tried to methods to accomplish this. The problem with the first is
that I can't seem to freeze the header. The problem with the second is that I
can't seem to enable outlining.
The first method involved using an HTML table. The second method involved
using openXML. In both methods I used the ASP.NET response property. to clear
the content(Response.ClearContent()), add the header
Response.AddHeader("content-disposition", attachment; filename=someName.xls),
content type(Response.ContentType = "application/ms-excel"), write out the
HTML using Response.Write(tableHtml), and then finally end the response using
Response.End.
So my question is how can I accomplish what I need without office being
installed on the server and without using third party controls.
on the server. I need to do this with both freezing a row so it will show on
every page when printed. This can be accomplished in excel 2007 using "Print
Titles". The other thing that's required is that grouping(outlining ) is
enabled with multiple levels. This can be accomplished in excel 2007 by going
into the "Data" tab and clicking "Group".
I have tried to methods to accomplish this. The problem with the first is
that I can't seem to freeze the header. The problem with the second is that I
can't seem to enable outlining.
The first method involved using an HTML table. The second method involved
using openXML. In both methods I used the ASP.NET response property. to clear
the content(Response.ClearContent()), add the header
Response.AddHeader("content-disposition", attachment; filename=someName.xls),
content type(Response.ContentType = "application/ms-excel"), write out the
HTML using Response.Write(tableHtml), and then finally end the response using
Response.End.
So my question is how can I accomplish what I need without office being
installed on the server and without using third party controls.