Excel cannot be open the file 'filename.xlsx' because the file format or file extension is not valid

Copper Contributor

Hi All,

 

I have a excel.xlsx file saved in my system which has been corrupted .I atleast need to recover the data stores .It is a file of 124 KB and has around 35 worksheets in the workbook .I have tried all possible ways to recover and repair the file .i even tried to extract the data using 3rd party application like stellar,ease of use recover application of excel still i have no luck . The below error message im getting whenever i try to open the file.I even tried to open it through other applications like wordpress,google sheets and so on but nothing works .

Muthu69_0-1593864048764.png

 

 

Thanks and regards ,

Muthuraman

48 Replies
Hello,

Can you attach the file for me to figure how to solve this for you?

This error message is encountered in the following scenarios:

  • The file is not compatible with the Excel-version
  • The file has become corrupt or damaged

I copied and pasted the file to my desktop, right-click and changed '.xlsx' to '.xls'. Boom!! I got my file back.
Try to open your corrupt file in safe mode. Press Windows+R and write excel.exe /safe and click OK.   Good Luck

@Muthu69 Hi. If you have tried all possible methods to repair your Excel file but none of them work, then maybe your Excel file is not corrupted, but you just don’t have permission to open it on your system. If you don’t have permission to open the Excel file, it will display the error "Excel cannot open the file because the file format or file extension is not valid." I have tested this on my Windows 10.  You can use the following steps to grant everyone on this computer permission to open the Excel file. 

  1. Right-click the Excel file that cannot be opened and select Properties.
  2. After the file’s Properties dialog opens, select the Security tab, and then click the Edit button.
  3. After the file’s Permissions dialog opens, click the Add button.
  4. When the Select Users or Groups dialog opens, click the Advanced button. When the next dialog opens, click Find Now so all users and groups will show up in the search results list at the bottom of the dialog. Select the Everyone group from the list, and then click OK. Click OK again.
  5. When you return to the Permissions dialog, you will see the Everyone group has been added to the group or user list. Select the Everyone group, check all checkboxes under Allow, and then click Apply.

That’s it. Now check if you can open the Excel file without any problems. If you want an illustrated guide, refer to this page: https://www.isumsoft.com/office/excel-cannot-open-the-file-because-extension-is-not-valid.html#way2

 

Please tell me if this helps. Good luck!

 

"I copied and pasted the file to my desktop, right-click and changed '.xlsx' to '.xls'. Boom!"

What did you click on when you right clicked in order to change the file type from xlsx to xls? Because I just tried this and cant figure it out.
I just tried this and it didnt work. Its still telling me the file doesnt match. So basically my excel file wont open as an xlsx or an xls? Why not?!!! This is really annoying!!! I just got a new laptop and im trying to open my bills spreadsheet, but for the life of me cant get the file to open. This is ridiculous!! I just want to open the dang file. Why does everything have to be so fricken complicated!??!?!

@Muthu69 

With your permission and everyone involved, if I can recommend.

It can help us all if you upload an Excel file, no picture.

You could get a precise solution much faster with a file.

This would also be a blessing for all of us,

as we can understand the problem much better,

a win-win situation for everyone.

 

*Knowledge of Excel version and the operating system is a must have if you want to proposing a reasonable solution (Example: office version e.g. 2016 or 2019 or 365 web or 365 pro, etc) and your operating system (e.g. Win10 (2004), Win 10 (1903), Mac, etc.).

 

Thank you for your understanding and patience

 

 

Nikolino

I know I don't know anything (Socrates)

how do you right click andchange to XLS?  this doesn't work for me - there is nowhere to change the xlsx toxls?!?!?@victoriyaluna 

@Muthu69 

 

Repair a damaged workbook
Click on File> Open.
Click the location and folder that contains the damaged workbook.
In the Open dialog box, select the damaged workbook.
Click the arrow next to the Open button, and then click Open and Repair

 

Repair a corrupted workbook

https://support.microsoft.com/en-us/office/repair-a-corrupted-workbook-153a45f4-6cab-44b1-93ca-801dd...

 

 

I would be happy to know if I could help.

 

Nikolino

I know I don't know anything (Socrates)

 

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.

 

@victoriyaluna 

I would like to try your solution for fixing the corrupt file by changing the extension, but I cannot find where to click to access it.  How do I change it?  Once I save the file to the desktop, right click, what do I do next?

@lollo585 @victoriyaluna 

In File Explorer, I clicked on view tab at the top and selected the option to show extensions.  Then I renamed the extension to xls. Unfortuatenly, when the document opened, it was blank - thankfully it was a copy.  Now I just need a different solution. I do appreciate your trying to help!

@NikolinoDE please help to open my file 

dhexter29_0-1616378223561.png

thank you and God Bless

@dhexter29 

It was probably not saved as an Excel file.

Before repairing, please change all Excel files to All files (*. *) .
If this is not the case either, it is very likely that it will no longer be possible to restore the file.

 

ALL_FILES_CHOICE.JPG

 

Additional Info: 

Repairing a corrupted workbook

 

Thank you for your understanding and patience

 

Nikolino

I know I don't know anything (Socrates)

@NikolinoDE 

In my case, the same problem occured after I moved my One Drive folder to another disk, because the original location had no more space.

After moving, the files in the new place became outdated, probably because local files were not synchronized with the cloud.

I deleted the original One Drive folder, and the system asked for a complete deletion, because the folder was too big.

After knowing that some of my spreadsheets were outdate, I recovered them using third party software, but Excel doesn't open them, the message is the same in this post.

I've tried all solutions posted here, and also all solutions proposed by Microsoft, but I had no success. It's frustrating because I can see that the size of the recovered file is a little bigger than the outdated file, what is coherent. Also, the same problem occurs with all spreadsheets restored. I still think that this thing is related to One Drive. 

Finally, I tried to attach one of the files and received the error message: 

  • The attachment's caixa 2021.xlsx content type (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) does not match its file extension and has been removed.

 

@glaydson 

With your permission, please open a new post when you like to make a new ask.

In this way, the different problems and solution approaches can be more easily understood for all members in the forum.

For those who have received a proposed solution in this post and thus solved their problem, I would like to ask you to mark the proposed solution as a correct answer and / or as a like (thumbs up), so that other members can also be better helped in the future.

 

That is the least that a person seeking help can do to pass on help.

 

At the same time, if I may recommend, always include a file (without sensitive data) in your request as far as possible. Describe your request as detailed as possible based on this file.

This is how you can help yourself and everyone who wants to help.

 

 

Thank you for your patience and understanding,

 

Nikolino

I know I don't know anything (Socrates)

I believe as the error statement correctly suggests the error is being caused due to invalid extension. Don’t worry there are several workarounds to this, I am sharing them below:

What Causes ‘Excel File Extension not Valid’ Error?

The error may occur due to any of these reasons:
1) The file is not compatible with the MS Excel version.
2) The Excel file is corrupt or damaged
FIX:

Method 1 – Change the Default File Format to Save Excel Workbooks
• In Excel 2007, click the ‘Microsoft Office’ button and then ‘Excel Options’. In Excel 2010 and higher versions, click File > Options.
• Select Export option.
• Select Change File Type option.
• Change the file extension, and then click Save As.

Method 2 – Recover Unsaved Workbook
• Go to File and select Info option.
• Under Manage Versions, select ‘Recover Unsaved Workbooks’ op
• If MS Excel has unsaved files then, it will list them. You can open and save it.

Method 3 – Use 'Open and Repair' Feature of MS Excel
• Open MS Excel application.
• Go to File and Select Open option.
• Select the corrupt file and choose Open and Repair option.

You can also check this forum: https://social.technet.microsoft.com/Forums/office/en-US/63020ccc-51d7-46d9-b956-121c0e6efcc8/excel-...

@Muthu69 

I encountered the same problem on a flow that HAD been working.  Does this solve your problem?

Short version

               On Create File command, I was using “Current Item” in File Content field. 

               I changed that to use “Attachments Content” instead and now it works just fine.

 

Step 1:  Initiate the workflow with “When a new email arrives….” Add whatever filtering conditions.

Step 2:  Choose New Action, SharePoint, Create File.

             Provide Site address, folder path, filename (with extension)

Step 3:  for File Contents, choose “Attachment Content” from the Dynamic Content menu.

               Do NOT choose “Current Item”.   

MelissaReed_0-1628867831938.png

 

 

When you choose “Attachments Content”, it will automatically transform Create File to be inside a loop and will look like this:

MelissaReed_1-1628867831945.png

 

 

Once I made that change  (use “Attachments Content” in File Content field) the Excel files I created opened correctly without error.

 

Credit to  That Office Guy: How to Save email attachments with Power Automate  

He was saving to OneDrive seeing him use “Attachment Content” for File Content solved my problem.