# Microsoft Office Application Help - Excel Help forum > Excel Programming / VBA / Macros >  >  Excel 2010: Different format than specified by the file extension.

## jambai

After upgrading to Excel 2010, I am getting the following error when try to open an existing
excel document or generating an excel from a web page (.asp page)

*The file you are trying to open <filename.xls> is in a different format than specified by the file extension. verify the file is not corrupted and is from trusted source before opening the file. Do you want to open the file now?*

This errors particularly occurs when I am trying to open an XLS file (Excel 2000-2003) with Excel 2010.

Is there any alternative way to fix this problem other than changing the registry *([HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Security]
ExtensionHardening=dword:00000000)* or using thrid party tools.

Thanks
Jambai

----------


## MarvinP

Hi,
I assume you have clicked on -> File -> Options -> Trust Center -> Trust Center Settings...
Down the left of this dialog you can see what locations are trusted and add where you normally open you files from.
Looking at these options in 2010 is my best suggestion.  Try turning some off and try to open  you file again to see which one matters.

----------


## jambai

Hi Marvin

I am not opening any exisitng file. Trying to export html values into an excel. It is working fine with Excell 2003.

Thanks
Jambai

----------


## MarvinP

So you export the HTML file and rename it with an .xlsx extension (?) and then try to open it with Excel?  
Or you have your File Associates to open HTM and HTML file with Excel?

I'm a little lost on what type of file you export and the name you use and then try to open it with Excel.

----------


## jambai

I am not exporting.

Adding <%Response.ContentType = "application/vnd.ms-excel"%> into an asp page will display the html results into an excel file.
Save the below code as .asp and run it in the system which has Excel 2010 on it.




```
Please Login or Register  to view this content.
```

----------


## MarvinP

I'm stumpped :Confused: 

I have no experience with .asp files and how to deal with them.  :Frown: 

Maybe one of the other members has an idea?

----------


## rekkaushal

Hey Jambai,
     i am having the same problem when i export data from asp to excel 2010. did u get a solution??
can u share that with me??

----------


## arthurbr

_Your post does not comply with Rule 2 of our Forum_ RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

----------

