export data to excel

Omego2K

New Member
Joined
Dec 23, 2008
Messages
1
Hi, my problem:

I need to export data in a GridView to excel without having office installed on the <nobr>server</nobr>. I need to do this with both freezing a row so it will show on every <nobr>page</nobr> when printed. This can be accomplished in excel 2007 using "Print Titles". The other thing that's <nobr>required</nobr> 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 <nobr>HTML</nobr> table. The second method involved using openXML. In both methods I used the ASP.NET response property. to clear the <nobr>content</nobr>(Response.ClearCont<wbr>ent()), add the header Response.AddHeader("conten<wbr>t-disposit<wbr>ion", attachment; filename=someName.xls), content type(Response.ContentType = "<nobr>application</nobr>/ms-excel"), write out the HTML using Response.Write(tableHtml),<wbr> 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.
 

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top