Forum Discussion

Adi_Star's avatar
Adi_Star
Copper Contributor
Mar 08, 2022

In Excel: "The file format and Extension don’t match”.

This error is coming repeatedly even, I am clicking on Yes, and the file is corrupted. How do I repair my file? Is there any solution to recover my file?

 

 

 

  • Un4tune8's avatar
    Un4tune8
    Copper Contributor

    Adi_Star I'm actually having this error now that I have upgraded to the latest version of Office 2013. I have actually figured out that if I shorten the filename by 4 characters the error goes away. The strange thing is the path and file name are less than 100 characters so it can't be path limit. Office version 15.5459.1000 does not give the error and Office version 15.0.5475.1001 does give the error.  If I move the file back one folder in the path it will open without the error but the path and filename are only about 85 characters total. Strange!

    • JavaLuigi's avatar
      JavaLuigi
      Copper Contributor

      You are right! My Office version is 15.0.5475.1000 which gives the same error. Shorten the filename for more than 20 characters does not give the error. Path and filename have less than 75 characters. It's a really strange error!

      • MikeRabe's avatar
        MikeRabe
        Copper Contributor

        JavaLuigi This is caused by KB5002242, and happens when opening Excel files saved on a shared drive (or other UNC path), where the total length of the path and file name exceed about 90 characters. The normal maximum length is 218 characters. Uninstalling KB5002242 is a temporary fix for getting rid of the error message.

    • MikeRabe's avatar
      MikeRabe
      Copper Contributor
      This is caused by KB5002242, and happens when opening Excel files saved on a shared drive (or other UNC path), where the total length of the path and file name exceed about 90 characters. The normal maximum length is 218 characters. Uninstalling KB5002242 is a temporary fix for getting rid of the error message.
      • Un4tune8's avatar
        Un4tune8
        Copper Contributor
        Thank you for the information. I hope they just fix it in the next office update since that is what appears to have actually broke it in the first place.
  • In what version of Excel was the file created? If in version 2007 or later, was it specifically saved in Excel 97-2003 format? If not, the default file extension would be xlsx. If you upload a copy of the file, someone may be able to open it for you.
    • shayan7's avatar
      shayan7
      Copper Contributor

      Doug_Robbins_Word_MVP 

      Hi dear Mr. Robbins. I also have faced with this problems. could u plz guide me? the original file created in excel 97-2003 in a laboratory computer. 

      thanks a lot 

      hakimi

  • Donald_Genes_'s avatar
    Donald_Genes_
    Brass Contributor
    Upload the file here let someone help you check the issue Assuming the file format is originally wrong

    Or rename it as . CSV and Open it

    Or Rename it as .TXT and open it via Notepad if it opens, copy the content to another new excel
    • wiser2013yahoocom's avatar
      wiser2013yahoocom
      Copper Contributor

      I have the same problem in one of my files. I want to upload a copy of my excel file (all my files have .xls extension since i use 97-2003 version of excel), but I don't know how to upload a copy of my file. Please let me know if you can help. Thanks.

  • Robin Shanab's avatar
    Robin Shanab
    Iron Contributor

    Adi_Star 

    Hello Adi,

    I am glad to assist you; please try the below solutions to repair your file.

    Solution 1: Change the default file format.

    Try changing the Excel default file format by following these steps:

    • In Excel 2010 and newer versions, click on the File menu.
    • Then, in the Info screen that appears, click on Options. 
    • In the 'Excel Options' window, under the Save workbooks section, click on the Save files in this file format: drop-down. Next, select a file format (i.e., the one supported by your Excel version).
    • Click OK.

    Check if you can open your Excel file. If not, try the next solution.

    Solution 2: Edit the excel file permissions

    Follow these steps to change the file permissions and see if it fixes the problem:

    • Right-click on the file that will not open and click Properties.
    • In the file properties dialog box, click the Security tab and hit the Edit button.
    • When the file's permissions dialog box appears, click on the Add button.
    • Next, click on the advanced button from the 'Select Users or Groups' window.
    • Select Find Now. A list of all users and groups will be displayed in a search results box. Choose everyone's group from the list and hit OK.
    • You can see the 'Everyone' group in the 'Enter the object names to select' textbox. Click OK once again to return to the file's permission dialog box.
    • Click everyone from the Group or user names: box and check all the checkboxes under Allow.
    • Click on Apply and then OK.

    Now try to open the Excel file. If you are still getting the Excel file cannot open error, you can refer  to the following thread and article:

    https://social.technet.microsoft.com/Forums/office/en-US/63020ccc-51d7-46d9-b956-121c0e6efcc8/excel-file-error-the-file-format-and-extension-dont-match?forum=Office2016ITPro

    https://www.stellarinfo.com/article/excel-cannot-open-the-file-because-the-extension-is-not-valid.php 

  • harshulz's avatar
    harshulz
    Iron Contributor
    hi,
    are you facing this problem with all files or specifically with this one,
    i m with donald genes, upload your file or mail so to fix this problem
  • VijayUK's avatar
    VijayUK
    Copper Contributor

    Hi

    I am having a similar problem and some people on the thread mentioned to upload the file onto here to get help. How do i do that? 

    Thanks in advance. 

Resources