Looks like your datagrid is not able to iterate through columns from your datasource (excel, from viewstate) That is not that strange. How on earth can your grid know what columns you have in your woorksheet? In Excel you can put your heading in row number 5 and start your columns at column C if you want. And you can have multiple "table" in each sheet. Excel is not structured the same way as a database.
You could do this almost as you do, but you will have to read the data from your database when you export, not from your viewstate (which is excel)
A little tip. This open source project is superb. It'l export your data as excel and it's very easy to use:
http://closedxml.codeplex.com/[
^]