GeekDork.com - work smarter not harder

Samples > Export to excel

When you want to write it out to Excel you just need to change the content type:

Response.ContentType = "application/vnd.ms-excel"

and then write out a simple HTML table with the data in it. The browser will recognize the content type and load the appropriate client application (Excel) for the type specified.

Click the "How It Works" in the upper right corner to see the exact code for this page.

Here's the data in a regular HTML. Click the "Show in Excel" link in the table to load the data directly into Excel.

This is the header

Show as web page
Show in Excel
datadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadata

This is the footer

GeekDork.com - Contact Us
This site is optimized for Internet Explorer.