471,319 Members | 1,427 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,319 software developers and data experts.

How to deal with "External table is not in the expected format" error ?


I have a C# .NET Web application that downloads a datagrid to an Excel
sheet. But when I upload the same excel sheet to server again, if gives
me this wiered message
"External table is not in the expected format".

I have some idea why this is happening..Because my downloaded file is
getting saved as an HTML file eventhough it will get opened in Excel
and looks like an Excel file. If I open the downloaded file and do a
neat 'Save as' as a NEW .xls file Manaully and then upload this new
file, everything will work.

So, I think I am trying to find out

How is it possible to download the excel file programatically as a TRUE
EXCEL file (Not an HTML file that looks like an Excel)

BTW, this is the code that downlaods the grid to excel..

Response.ContentType = "application/vnd.ms-excel";
Response.Charset = "";
Response.AddHeader("Content-Disposition", "attachment;

Please help...

Dec 8 '05 #1
0 6474

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.