1. From Gridview
2. Using XLST file
Code for Gridview to XLS:
Download code for Gridview to Excel
Code for XLS using XSLT:
Download code for generating excel using XSLT
Note:
- Better way is using XSLT.
- XSLT is fast resource for generating XSL
- Can be used with any datasource taking XML in between.