When I export a GridView to Excel 2007 I get an error message:
The file you are trying to open < > is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?
This worked OK with Excel 2003. I called Microsoft and they told me I was using a non-release version which is not true. My Office 2007 was downloaded from MSDN in Dec 2006. I found a reference on the Internet that said this problem would be fixed in
the released version but it is not.
This is a known issue that will be addressed before Excel 2007 ships. The alert can be safely ignored when using Excel 2002 or 2003 to save a file to the new Excel 2007 formats (XLSX, XLSB, etc.)
The question of exporting to Excel 2007 was never answered. I am using the most up-to-date Excel 2007 and VS 2005 and I still get the error message below.
The file you are trying to open < > is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?
Any update. I cannot believe this has not been fixed yet.
I am having the same issue when I run scripts on our web site that allow us to export tabled data to excel. Excel 2003 does not complain at all, but 2007 insists that it is the wrong format, using the exact same error message.
I contacted MicroSoft and their answer was that this is a new security warning and there is no way to get around it. If you use XML as the file format then you do not get that message.
Using XML as the file format, you do still get the problem - this is delivering the document using the "application/vnd.ms-excel" MIME-type. If I use "text/xml" instead, the browser does not open the document in Excel. We still need a proper solution to
this.
I am also having the same problem, it seems that we are not alone with this issue either. I have browsed the web for a few days but to no avail. I set up an xml filestream from an aspx page, it works fine in Excel 2003 but not in 2007. I do not believe
that this problem will ever be resolved for Excel 2007. Regards TSB.
EJLindsay
Member
298 Points
161 Posts
Problems in Exporting to Excel 2007
Feb 02, 2007 01:23 AM|LINK
When I export a GridView to Excel 2007 I get an error message:
The file you are trying to open < > is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?
This worked OK with Excel 2003. I called Microsoft and they told me I was using a non-release version which is not true. My Office 2007 was downloaded from MSDN in Dec 2006. I found a reference on the Internet that said this problem would be fixed in the released version but it is not.
Help
Jay
NileshDesh
Participant
752 Points
186 Posts
Re: Problems in Exporting to Excel 2007
Feb 02, 2007 04:49 AM|LINK
Jay,
Many times I've found that disabling ViewState altogether solves the problem. Let me if that works for you.
MCP, MCAD.Net, MCSD.Net, SCJP
Future is here, it's just not widely distributed yet.
Jerome Cui -...
Star
12018 Points
1080 Posts
Re: Problems in Exporting to Excel 2007
Feb 05, 2007 08:28 AM|LINK
Hi, Jay
This is a known issue that will be addressed before Excel 2007 ships. The alert can be safely ignored when using Excel 2002 or 2003 to save a file to the new Excel 2007 formats (XLSX, XLSB, etc.)
other reference : http://support.microsoft.com/kb/317719
Hope this helps
Please "mark as answer" if it's useful for you
Sincerely,
Jerome
EJLindsay
Member
298 Points
161 Posts
Re: Problems in Exporting to Excel 2007
Apr 03, 2007 11:13 PM|LINK
The question of exporting to Excel 2007 was never answered. I am using the most up-to-date Excel 2007 and VS 2005 and I still get the error message below.
The file you are trying to open < > is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?
Any update. I cannot believe this has not been fixed yet.
Jay
whereizben
Member
2 Points
1 Post
Re: Problems in Exporting to Excel 2007
Apr 20, 2007 03:00 PM|LINK
I am having the same issue when I run scripts on our web site that allow us to export tabled data to excel. Excel 2003 does not complain at all, but 2007 insists that it is the wrong format, using the exact same error message.
My version is 12.0.4518.1014
EJLindsay
Member
298 Points
161 Posts
Re: Problems in Exporting to Excel 2007
Apr 20, 2007 04:12 PM|LINK
I contacted MicroSoft and their answer was that this is a new security warning and there is no way to get around it. If you use XML as the file format then you do not get that message.
Jay
phildoble
Member
2 Points
1 Post
Re: Problems in Exporting to Excel 2007
Sep 18, 2007 08:46 PM|LINK
Using XML as the file format, you do still get the problem - this is delivering the document using the "application/vnd.ms-excel" MIME-type. If I use "text/xml" instead, the browser does not open the document in Excel. We still need a proper solution to this.
TonySmith-Br...
Member
2 Points
1 Post
Re: Problems in Exporting to Excel 2007
Nov 19, 2007 01:20 PM|LINK
I am also having the same problem, it seems that we are not alone with this issue either. I have browsed the web for a few days but to no avail. I set up an xml filestream from an aspx page, it works fine in Excel 2003 but not in 2007. I do not believe that this problem will ever be resolved for Excel 2007. Regards TSB.
dclash
Member
27 Points
6 Posts
Re: Problems in Exporting to Excel 2007
Jan 31, 2008 06:47 PM|LINK
Has anyone resolved this issue? I am having the same problem.
ageuni
Member
2 Points
3 Posts
Re: Problems in Exporting to Excel 2007
Feb 07, 2008 01:32 AM|LINK
I am also having the same problem...any solutions floating around out there?