Google is an amazing tool: a quick search using the new subject for your question "Export GridView data to Excel" gave 1,490,000 hits. Including this one, right at the top:
Export GridView to Excel Complete Code![
^]
The whole first page of the search was different ways to achieve it with full source code...
Use Google. It can save you a lot of time and effort.