Dear Friend
Actually what you were doing in the code is
You are rendering the Datagrid to HTML Code.
And you are posting the content on to Client browser as Excel file by changing the response headers.
Due to the advance features of Office 2002, it is displayed as HTML for the clients with Office 2002 which is not the case with prior versions of Excel.
To clear your details, you save and open file with notepad, you can find the HTML Content.
If you really want to export the content to Excel, you can do that by using Office web Components installed on the web server.
Regards,
SD
|