Excel 2007 error: Different format than specified by the file extension

After upgrading to Excel 2007, you may get the following error when you try to open an excel document:
The file you are trying to open .xlsx 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 you’re trying to open an XLS file (Excel 2000-2003) with Excel 2007.

The easiest way to solve this problem, is to insert the following registry key. This will suppress the notification:

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Excel\Security]
“ExtensionHardening”=dword:00000000

The step-by-step instructions are as follows:

  1. Click Start, click Run, type regedit.exe and press ENTER. This will open your Registry
  2. Navigate to HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\OFFICE\12.0\EXCEL\SECURITY
  3. Right click in the right window and choose New -> DWORD
  4. In the Name field, type “ExtensionHardening”  (without the quotes)
  5. Verify that the data has the value “0”

I advice the steps above to solve the problem, despite the fact that it is quick and dirty.

If you want a more constructive way, you should define MIME types and associate them with extensions.
When you use a Document Management System (like Sharepoint or Livelink), you can try adding these:
.xls = application/msexcel
.xlsx = application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

118 thoughts on “Excel 2007 error: Different format than specified by the file extension

  1. Accidentaly i delete my partitions and i use some partions recovery like minitool,partion magic 9.0 and get partitions and data back. but when i create new partiton usind partition magic9.0 suddenly current gone when i started pc again all partitions and data available but one partions nothing open my Photo,songs,videos, word file excel file what i do Plese suggest i need only Phosts and word excel file when i open excel file erreor msg is “The file you are trying to open .xlsx 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?” and when i tried word file its open square box and Photo shows no preview available. please help me

  2. It means that you get total discounts at the time of subscription. Dream – Host is an online hosting company that offers products like domain registration, shared website hosting, Virtual Private
    Server (VPS), and public cloud services. You can be diligent about protecting your website but someone else on the same server
    might not be.

  3. I an trying to save the excel file through jsp. i gave below piece of code in my jsp

    response.setHeader(“Content-disposition”, “inline;filename=FMI_GlobalSummary.xlsx”);

    file saved but while a am trying to open that excel file it is giving the error The file you are trying to open .xlsx 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?

    Please help me here- need it urgently

  4. Hi
    I am working in sharepoint 2013 , exporting excel of rdlc file rendering problem..opening in PDF s working fine..after exporting into excel and trying to open the excel i am not getting the exact content..

  5. I hope you write more on this subject! Wow, that was pretty interesting. Inspiring, as well. Thanks for sharing such inspiring experience with us. Great blog, congrats! I found lots of interesting information here. The post was professionally written and I feel like the author has extensive knowledge in this subject.

  6. Hi I tried adding HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\OFFICE\12.0\EXCEL\SECURITY
    but my excel documents are still corupt. any help please

  7. It did work for me. However I did add it under 14.0 instead of 12.0
    HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Security]

    Cheers

    1. It did work for me. However I did add it under 14.0 instead of 12.0
      HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Security]

      Cheers

      1. Need Help!!
        i am looking for solution which give, eport in xlsx (2007)format in Jsp.
        i tried all possible ways you mentioned, but its not working..
        Is there any other way, to overcome to this problem

        Hey hii
        I an trying to save the excel file through jsp.
        file saved but whikle a am trying to open that excel file it is giving the error The file you are trying to open .xlsx 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?

        i am workin in excel 2007,i do all changes in 12.0 but still not working,there is no 14.0,there is only 8.0 other than 12.0,but in that 8.0 there is no option like security
        what should i do?
        plz help me

      2. Hey hii
        I an trying to save the excel file through jsp.
        file saved but whikle a am trying to open that excel file it is giving the error The file you are trying to open .xlsx 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?

        i am workin in excel 2007,i do all changes in 12.0 but still not working,there is no 14.0,there is only 8.0 other than 12.0,but in that 8.0 there is no option like security
        what should i do?
        plz help me

    2. IT WORKED FOR BY CHOOSE THIS ONE . than”s

      It did work for me. However I did add it under 14.0 instead of 12.0
      HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Security]

      Cheers

  8. hi.. what you gave worked. it just remove the message box. My problem is when i always open it, with or without the “extensionHardening”, it doesn’t show anything.. what should i do?

  9. I was working on office 2007 file. Then my pc became turned off due to electricity problem. After this, when i turn on my pc i have lost my excel file. An xls file is appeared instead. when i tries to open it then says, “The file you are trying to open .xlsx 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?”
    Please Please Please Help Me its my job’s problem.

    1. For people who are getting junk characters they can try removing Response.ClearHeaders(). This gives error with IIS 6

      How do you remove Response.ClearHeaders()

  10. Need Help!!
    i am looking for solution which give, eport in xlsx (2007)format in Jsp.
    i tried all possible ways you mentioned, but its not working..
    Is there any other way, to overcome to this problem

  11. Accidentaly i delete my partitions and i use some partions recovery like minitool,partion magic 9.0 and get partitions and data back. but when i create new partiton usind partition magic9.0 suddenly current gone when i started pc again all partitions and data available but one partions nothing open my Photo,songs,videos, word file excel file what i do Plese suggest i need only Phosts and word excel file when i open excel file erreor msg is “The file you are trying to open .xlsx 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?” and when i tried word file its open square box and Photo shows no preview available. please help me

    1. Accidentaly i delete my partitions and i use some partions recovery like minitool,partion magic 9.0 and get partitions and data back. but when i create new partiton usind partition magic9.0 suddenly current gone when i started pc again all partitions and data available but one partions nothing open my Photo,songs,videos, word file excel file what i do Plese suggest i need only Phosts and word excel file when i open excel file erreor msg is “The file you are trying to open .xlsx 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?” and when i tried word file its open square box and Photo shows no preview available. please help me

  12. The file you are trying to open .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.

    I am getting while try to open a EXL 2003 file in 2007.Is there any other way to reslove this prob except registry change or group change policy

    1. The file you are trying to open .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.

      I am getting while try to open a EXL 2003 file in 2007.Is there any other way to reslove this prob except registry change or group change policy

  13. hFÿÿÿÿ@À{°FØÿÿÿÿ@X|p|˜| ”•0…°Fÿÿÿÿ@X|øFÐÿÿÿÿ@è|} }0–0…øFÿÿÿÿ@è|0GÈÿÿÿÿ@p}ˆ}¨}—0…0Gÿÿÿÿ@p}hG¸ÿÿÿÿ@ø}~P~ ™x™°„(¦P™„hGÿÿÿÿ@ø}°Gxÿÿÿÿ@H Hÿÿÿÿ@È~à~¸ž œè›À›˜›°Gpÿÿÿÿ@H¨œÀp°Gÿÿÿÿ@H Hÿÿÿÿ@È~ÐHÿÿÿÿ@€ €àH€ Ÿ0…¨Hÿÿÿÿ@p€ˆ€H€ Ÿ0…êPÿÿÿÿ@ †`RPÿÿÿÿ@H xI

    Dear all,
    i did with registry file as you told you above but excel file is still showing the same issue actually i
    had recover that excel data and know it is not opened
    i got this error message when try to open it

    the file you are trying to open,name.xls is in a different format then specified by the file extension. verify that file is not corrupted and is from
    a trusted source before open the file do you want to open the file now ?

    some one can please tell me the solution

  14. Hi,

    While opening the file we receives the content which was low level format example ” ªdÕ /1éƒO@üôâVR-D«›°‰)¿:5Ë«±Ï!œn¶h%P¹Þ.Þy¼äÞXÎàš43€x©õJÉ<ÁHl-&ð´æ)Tm á ‘Gí€=mm`„µ„ þ "….
    ªdÕ /1éƒO@üôâVR-D«›°‰)¿:5Ë«±Ï!œn¶h%€P(Þ.Þy¼äÞXÎàš†Ê‡¨õJÉ<ÁHl-&~´æ)¹m á<n¸<6~Â’wýŸ{,yß+ØoåSPp:HFÝKygÆ­

    any other way to open the file

  15. Sir,

    While opening the file we receives the content which was low level format example ” ªdÕ /1éƒO@üôâVR-D«›°‰)¿:5Ë«±Ï!œn¶h%P¹Þ.Þy¼äÞXÎàš43€x©õJÉ<ÁHl-&ð´æ)Tm á ‘Gí€=mm`„µ„ þ "….

    please suggest in this regard.

    Thanks, Ali.

    1. Sir,

      While opening the file we receives the content which was low level format example ” ªdÕ /1éƒO@üôâVR-D«›°‰)¿:5Ë«±Ï!œn¶h%P¹Þ.Þy¼äÞXÎàš43€x©õJÉ<ÁHl-&ð´æ)Tm á ‘Gí€=mm`„µ„ þ “….

      please suggest in this regard.

      Thanks, Ali.

  16. It works good.

    Would lke to know is there any other alternative rather than changing the registry or group policy.

    Thanks
    Jambai

  17. I was gettibg the same error, the regedit jhelps to erase the error but still the data is incorrect. It gives some corrupt junk data.
    Can u help please?

  18. I’m having this issue with a file when I open it. Your solution looks good, but won’t it only work on my laptop? What can I do if my file is going to be opened by others on different computers?

    1. I’m having this issue with a file when I open it. Your solution looks good, but won’t it only work on my laptop? What can I do if my file is going to be opened by others on different computers?

      that would be their problem and not yours.

    1. Not at all working>Janet

      HiPlease give the proper solution

      Thanks

      Thank you so much for the fix. Worked great!Janet

  19. I was getting the error like file format is not specified after opening the 2003 macro excel file in 2007 excel. After doing the steps given above , error message is not coming but excel sheet gets disappeared after complete processing. Please advice.

    1. I was getting the error like file format is not specified after opening the 2003 macro excel file in 2007 excel. After doing the steps given above , error message is not coming but excel sheet gets disappeared after complete processing. Please advice.  (Quote)

  20. Dear sir,
    The file you are trying to open .xlsx 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.

    This problem that i am facing. So please give me suggest . this is very important to us. So please help me sir. this is my Humble request for u. please reply me. i want suggestion from u. help me plz. even i tried the procedure. which u gave in the website but its not working.
    plz help me sir. i wish u will help me

    Regards,
    Srinivas

    1. Sir,While opening the file we receives the content which was low level format example ” ªdÕ /1éƒO@üôâVR-D«›°‰)¿:5Ë«±Ï!œn¶h%P¹Þ.Þy¼äÞXÎàš43€x©õJÉ<ÁHl-&ð´æ)Tm á ‘Gí€=mm„µ„ þ "….please suggest in this regard.Thanks, Ali.

      Dear sir,The file you are trying to open .xlsx 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. This problem that i am facing. So please give me suggest . this is very important to us. So please help me sir. this is my Humble request for u. please reply me. i want suggestion from u. help me plz. even i tried the procedure. which u gave in the website but its not working.plz help me sir. i wish u will help me Regards,Srinivas

      Hi,While opening the file we receives the content which was low level format example ” ªdÕ /1éƒO@üôâVR-D«›°‰)¿:5Ë«±Ï!œn¶h%P¹Þ.Þy¼äÞXÎàš43€x©õJÉ<ÁHl-&ð´æ)Tm á ‘Gí€=mm„µ„ þ “….ªdÕ /1éƒO@üôâVR-D«›°‰)¿:5Ë«±Ï!œn¶h%€P(Þ.Þy¼äÞXÎàš†Ê‡¨õJÉ<ÁHl-&~´æ)¹m á<n¸<6~Â’wýŸ{,yß+ØoåSPp:HFÝKygÆ­ any other way to open the file

      FILE OPEN IN THIS FORMAT ( I HAVE SAME PROBLEM IN EXCEL AND WORD)c+B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„BPlease advise how can i Open my file.Any software or translator or any other way to change the extention to open and recover my data.Please reply.Thank.

  21. FILE OPEN IN THIS FORMAT ( I HAVE SAME PROBLEM IN EXCEL AND WORD)

    c+B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B

    Please advise how can i Open my file.

    Any software or translator or any other way to change the extention to open and recover my data.

    Please reply.
    Thank.

  22. Hello i cannot open my excel file it was working fine suddenly it shows this error. I tried the way which you had mentioned above but doesn’t work out.
    :c+B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B€‘©{‘øÑ‘û1‘

    Please advise how can i fix this file.
    Any software or translator or any other way to change the extention to open and recover my data.

    Please reply.

    Thank.

  23. hello..my excel worksheet writes the following:c+-B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B€‘©{‘øÑ‘û1‘

    so how can i repair the data that has been lost,,
    and there is any way to translate this symbols to the original data that Ive inputted it????

    please help.

    1. hello..my excel worksheet writes the following:c+-B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B!„B€‘©{‘øÑ‘û1‘

      so how can i repair the data that has been lost,,
      and there is any way to translate this symbols to the original data that Ive inputted it????

      please help.

  24. sir
    i have tried your trick, file become open with out any error but the content of file become changed in 0 1 and others alphabatic, please hel me out

  25. hi
    ive tries your trick , now i m not getting the error msg , but file is still corrupt all i c is special character but no data.
    can u help me with that
    thank u

  26. even i am same face if u found any solution let me

    Thank you,
    Narender

    Umesh: I tried above solution and it works fine for me. But i don’t want to do any changes in registry .Is there any other solution ?
    I am using c# and asp.net 2.0 . Here i am export grid view in excel file and when i opened excel file that time above warning message i am facing .
    Regard,
    Umesh.

  27. Do you have a solution for Vista? The registry values as explained must be in XP only, because the information is not found in the visa registry. Can you confirm. Thank you.

  28. I had changed the registry values as suggested. I could able to open the files
    without any error this is great and I am getting a blank worksheet and I am worried about my data. Any work around this to retreive my data back.
    Thanks,
    Surender.

  29. Even changed the setting the ContentType for XLS as well as XLSX
    I am getting the same problem with the error mesg “Different format than specified by the file extension”

    Jon Where I have to add code “FilFormatNum” , cna you please give examples

  30. This error is commonly caused when .SaveAs VBA code (or export from an application) specifies the file should be created as filename.xls whilst saving in 2007 (i.e. xml) format.

    When this file is then opened:

    – In Office 2007 you get the format file extension error but it will open and work fine
    – In Office 97-2003 the file will open but will appear corrupted as 97-2003 cannot interpret xml files

    The solution from a macro perspective is to modify the code to specify the file format by adding the following code if you need to share with people on older excel (this will make it save in .xls format as well as be named . xls):

    FileFormatNum = 56
    or
    FileFormatNum = xlExcel8

    If only sharing with 2007 users, modifying the filename to be filename.xlsx will also solve this issue (this can also be done manually if files are only used by 2007 users).

    Hope this helps

  31. I tried above solution and it works fine for me. But i don’t want to do any changes in registry .Is there any other solution ?
    I am using c# and asp.net 2.0 . Here i am export grid view in excel file and when i opened excel file that time above warning message i am facing .

    Regard,
    Umesh.

  32. Inspite of setting the ContentType for XLS as well as XLSX…I am getting the same problem with the weird mesg “Different format than specified by the file extension”

    Any help is highly appreciated

    -Sreek

  33. Thank you so very much. I’ve been pestered by that annoying pop-up for months; I deal with a very large number of Excel files that don’t have an extension and constantly throw this error. This has seriously given me 5 minutes of my day back.

  34. I heard about not bad application-xlsx repair Microsoft, know how will display a dialog box with the question whether this worksheet should actually be scanned, also with help it you may try to open the necessary *.xls, *,xlt, *.xlsx, xlsm, *.xltm, *.xltx, *.xlam file and see an error message on the screen instead of it: Microsoft Excel unable to read file, This file is not in a recognizable format, etc.

    1. THANKS!!, IT REALLY WORKS.BEST REGARDS.

      Thanks for solution

      thanks for you friend but I use and try it

      Thanks a lot.

      Hey Thanks For it Awesome its working

      Hi ,I have already tried the above solution , it’s working. But i want the solution in the way that from the jsp code. If you find any solutioni will be very happy.Thanks,vasanth.

      Hi,Its working.Thanks,Devendra Patil,Jalgaon

      Hi,Your solution really worked.Its excellent.Thanks,Amber Bhatnagar.

  35. hi
    ive tries your trick , now i m not getting the error msg , but file is still corrupt all i c is special character but no data.
    can u help me with that
    thank u

    1. hi
      ive tries your trick , now i m not getting the error msg , but file is still corrupt all i c is special character but no data.
      can u help me with that
      thank u

  36. Hi ,

    I have already tried the above solution , it’s working. But i want the solution in the way that from the jsp code. If you find any solution
    i will be very happy.

    Thanks,
    vasanth.

Leave a Reply

Your email address will not be published.