473,372 Members | 1,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 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 6556

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: python | last post by:
Hi- I'm getting a "DeprecationWarning: integer argument expected, got float" warning with mx.DateTime and I can't figure out why. Can anyone help me out? This code: import mx.DateTime
by: Bennett Haselton | last post by:
I'm trying to port my MySQL tables for a database called "tracerlock" from one server to another. On the old server, in the /var/lib/mysql/tracerlock directory, there was a ".MYD", ".MYI" and...
by: Danny | last post by:
Hi I don't understand why I keep getting "Error: Object expected" I tried different things and haven't been able to solve it. I'm a newbie so I'm not sure what I'm doing wrong. The debugger breaks...
by: Rick | last post by:
I wrote the following code as part of a page where users can reorder a list of items by highlighting an item in a list box and clicking an "up" or "down" button to move the items around. The code...
by: Chuck Martin | last post by:
I am having a most frustrating problem that references, web searches, and other resources are no help so far in solving. Basically, I'm trying to design a pop-up window to be called with a funciton...
by: elvin | last post by:
Okay - apologize in advance for the length, but I want to make sure all you knowledgeable and helpful people have all the details you need to hopefully point my newbie rear in the right direction....
by: rdi | last post by:
The import statements weren't copy/pasted, but everything INSIDE the class WAS copy pasted from the help file. Starting with the myMail.From line and going down to the SmtpMail.Send line, EVERY line...
by: Pradeep83 | last post by:
Hi All, Good Morning Here I am jotdowning my problem I am compiling a .c file in Free BSD 6.0 and exceuting there itself. and i have taken that...
by: atksamy | last post by:
HI, I am using the following query in vba and i get a compile error end of statement expected. sqltext = "SELECT .utyp, .uart, COUNT(.uart) AS CountOfuart," & _ ...
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.