How to export data to Excel spreadsheet from ASP.NET application?

I am working on a ASP.NET 2.0 application, which requires to export the data to an excel spreadsheet.
It requires:
(1) Tabbed. So need to create multiple tabs. Each tab has its own name.
(2) Might require color coded contents
(3) Requires column name
(4) It will show some special line item, such as sub total (on spread sheet, just show the number) on some of the column. So it is not as easy as export a whole dataset or dataview.

How do I do this? I have seen some examples for winform, but NOT webform. The ideal solution would include the dialog box for user to save or open.

How do I achieve this?
LVL 1
chuang4630Asked:
Who is Participating?
 
jonorossiConnect With a Mentor Commented:
I just found this Excel library that is free which might be of use:
http://www.carlosag.net/Tools/ExcelXmlWriter/Default.aspx
0
 
jonorossiCommented:
You can use use automation to build the document using Excel on the server and send the bytes down to the client to save to their disk like these articles:
http://support.microsoft.com/kb/302084
http://www.codeproject.com/csharp/Simple_Excel_Automation.asp

Or you can get a component that doesn't require excel to be installed on the server and can build excel files in memory in pure 100% managed code like these ones:
http://www.syncfusion.com/products/xlsio/web/default.aspx
http://www.spreadsheetgear.com/products/spreadsheetgear.net.aspx
0
 
jonorossiCommented:
I provided chuang4630 a list of products he could use and didn't hear anything back. Either he choose one from the list and didn't close the question or he was happy with the answer but didn't say so. I believe the products I listed would do what was being asked for.
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.