HOW TO: Export to Excel from ASP.NET
Solutions
Solution 1: Render DataGrid or GridView web form control
ASP.Net 2.0: Export GridView to Excel
by Dipal Choksi (C# Corner) - renders GridView control to Excel.
Related:
ASP.Net 2.0: Export GridView to Excel - Part II
Export ASP.NET DataGrid to Excel
by Dipal Choksi (C# Corner) - renders DataGrid control to Excel.
How To Export Data in a DataGrid on an ASP.NET WebForm to Microsoft Excel
(Microsoft Help and Support) - step-by-step guide to populate a DataGrid Web server control on an ASP.NET WebForm and then export the contents of the DataGrid to Microsoft Excel; code examples are in VB.NET.
Export GridView to Excel
by Matt Berseth - C# and VB.NET code available.
Solution 2: Use Office interop (requires Office components installed)
Export to Excel
by Steve C. Orr (ASPNETPro)
Solution 3: Export as CSV/Excel
One click ASP.NET export button control for Excel/CSV file
by Prashant Nayak (CodeProject)
Related Resources
Create Dynamic ASP.NET Excel Workbooks In C#
by Peter Bromberg
MSDN: Interoperating with Unmanaged Code