Here's my compiled code for you guys to start playing around with it.
To use the control in VS 2005,
- 1) Download this DLL on to your local machine.
2) Go to your toolbox and right click-->Choose Items
3) Select this DLL. You should see a new control called "ExportToExcel" in the toolbox
4) Simply Drag and drop the control onto your web form
Note: You must have a gridview control in the form for the export to work obviously
. If you do not have a gridview, then the button will be in disabled state.