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

%3CLINGO-SUB%20id%3D%22lingo-sub-1504346%22%20slang%3D%22en-US%22%3EExcel%20cannot%20be%20open%20the%20file%20'filename.xlsx'%20because%20the%20file%20format%20or%20file%20extension%20is%20not%20valid%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1504346%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20excel.xlsx%20file%20saved%20in%20my%20system%20which%20has%20been%20corrupted%20.I%20atleast%20need%20to%20recover%20the%20data%20stores%20.It%20is%20a%20file%20of%20124%20KB%20and%20has%20around%2035%20worksheets%20in%20the%20workbook%20.I%20have%20tried%20all%20possible%20ways%20to%20recover%20and%20repair%20the%20file%20.i%20even%20tried%20to%20extract%20the%20data%20using%203rd%20party%20application%20like%20stellar%2Cease%20of%20use%20recover%20application%20of%20excel%20still%20i%20have%20no%20luck%20.%20The%20below%20error%20message%20im%20getting%20whenever%20i%20try%20to%20open%20the%20file.I%20even%20tried%20to%20open%20it%20through%20other%20applications%20like%20wordpress%2Cgoogle%20sheets%20and%20so%20on%20but%20nothing%20works%20.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Muthu69_0-1593864048764.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F203263iB852D581C454C9B4%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Muthu69_0-1593864048764.png%22%20alt%3D%22Muthu69_0-1593864048764.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20and%20regards%20%2C%3C%2FP%3E%3CP%3EMuthuraman%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1504346%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1504371%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20cannot%20be%20open%20the%20file%20'filename.xlsx'%20because%20the%20file%20format%20or%20file%20extension%20is%20not%20v%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1504371%22%20slang%3D%22en-US%22%3EHello%2C%3CBR%20%2F%3E%3CBR%20%2F%3ECan%20you%20attach%20the%20file%20for%20me%20to%20figure%20how%20to%20solve%20this%20for%20you%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1656863%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20cannot%20be%20open%20the%20file%20'filename.xlsx'%20because%20the%20file%20format%20or%20file%20extension%20is%20not%20v%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1656863%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20error%20message%20is%20encountered%20in%20the%20following%20scenarios%3A%3C%2FP%3E%3CUL%3E%3CLI%3EThe%20file%20is%20not%20compatible%20with%20the%20Excel-version%3C%2FLI%3E%3CLI%3EThe%20file%20has%20become%20corrupt%20or%20damaged%3C%2FLI%3E%3C%2FUL%3E%3CP%3EI%20copied%20and%20pasted%20the%20file%20to%20my%20desktop%2C%20right-click%20and%20changed%20'.xlsx'%20to%20'.xls'.%20Boom!!%20I%20got%20my%20file%20back.%3CBR%20%2F%3ETry%20to%20open%20your%20corrupt%20file%20in%20safe%20mode.%20Press%20Windows%2BR%20and%20write%20excel.exe%20%2Fsafe%20and%20click%20OK.%26nbsp%3B%26nbsp%3B%20Good%20Luck%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1786633%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20cannot%20be%20open%20the%20file%20'filename.xlsx'%20because%20the%20file%20format%20or%20file%20extension%20is%20not%20v%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1786633%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F718529%22%20target%3D%22_blank%22%3E%40Muthu69%3C%2FA%3E%26nbsp%3BHi.%20If%20you%20have%20tried%20all%20possible%20methods%20to%20repair%20your%20Excel%20file%20but%20none%20of%20them%20work%2C%20then%20maybe%20your%20Excel%20file%20is%20not%20corrupted%2C%20but%20you%20just%20don%E2%80%99t%20have%20permission%20to%20open%20it%20on%20your%20system.%20If%20you%20don%E2%80%99t%20have%20permission%20to%20open%20the%20Excel%20file%2C%20it%20will%20display%20the%20error%20%22Excel%20cannot%20open%20the%20file%20because%20the%20file%20format%20or%20file%20extension%20is%20not%20valid.%22%20I%20have%20tested%20this%20on%20my%20Windows%2010.%20%26nbsp%3BYou%20can%20use%20the%20following%20steps%20to%20grant%20everyone%20on%20this%20computer%20permission%20to%20open%20the%20Excel%20file.%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3ERight-click%20the%20Excel%20file%20that%20cannot%20be%20opened%20and%20select%20Properties.%3C%2FLI%3E%3CLI%3EAfter%20the%20file%E2%80%99s%20Properties%20dialog%20opens%2C%20select%20the%20Security%20tab%2C%20and%20then%20click%20the%20Edit%20button.%3C%2FLI%3E%3CLI%3EAfter%20the%20file%E2%80%99s%20Permissions%20dialog%20opens%2C%20click%20the%20Add%20button.%3C%2FLI%3E%3CLI%3EWhen%20the%20Select%20Users%20or%20Groups%20dialog%20opens%2C%20click%20the%20Advanced%20button.%20When%20the%20next%20dialog%20opens%2C%20click%20Find%20Now%20so%20all%20users%20and%20groups%20will%20show%20up%20in%20the%20search%20results%20list%20at%20the%20bottom%20of%20the%20dialog.%20Select%20the%20Everyone%20group%20from%20the%20list%2C%20and%20then%20click%20OK.%20Click%20OK%20again.%3C%2FLI%3E%3CLI%3EWhen%20you%20return%20to%20the%20Permissions%20dialog%2C%20you%20will%20see%20the%20Everyone%20group%20has%20been%20added%20to%20the%20group%20or%20user%20list.%20Select%20the%20Everyone%20group%2C%20check%20all%20checkboxes%20under%20Allow%2C%20and%20then%20click%20Apply.%3C%2FLI%3E%3C%2FOL%3E%3CP%3EThat%E2%80%99s%20it.%20Now%20check%20if%20you%20can%20open%20the%20Excel%20file%20without%20any%20problems.%26nbsp%3BIf%20you%20want%20an%20illustrated%20guide%2C%20refer%20to%20this%20page%3A%20%3CA%20href%3D%22https%3A%2F%2Fwww.isumsoft.com%2Foffice%2Fexcel-cannot-open-the-file-because-extension-is-not-valid.html%23way2%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.isumsoft.com%2Foffice%2Fexcel-cannot-open-the-file-because-extension-is-not-valid.html%23way2%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20tell%20me%20if%20this%20helps.%20Good%20luck!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1901367%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20cannot%20be%20open%20the%20file%20'filename.xlsx'%20because%20the%20file%20format%20or%20file%20extension%20is%20not%20v%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1901367%22%20slang%3D%22en-US%22%3E%22I%20copied%20and%20pasted%20the%20file%20to%20my%20desktop%2C%20right-click%20and%20changed%20'.xlsx'%20to%20'.xls'.%20Boom!%22%3CBR%20%2F%3E%3CBR%20%2F%3EWhat%20did%20you%20click%20on%20when%20you%20right%20clicked%20in%20order%20to%20change%20the%20file%20type%20from%20xlsx%20to%20xls%3F%20Because%20I%20just%20tried%20this%20and%20cant%20figure%20it%20out.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1901376%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20cannot%20be%20open%20the%20file%20'filename.xlsx'%20because%20the%20file%20format%20or%20file%20extension%20is%20not%20v%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1901376%22%20slang%3D%22en-US%22%3EI%20just%20tried%20this%20and%20it%20didnt%20work.%20Its%20still%20telling%20me%20the%20file%20doesnt%20match.%20So%20basically%20my%20excel%20file%20wont%20open%20as%20an%20xlsx%20or%20an%20xls%3F%20Why%20not%3F!!!%20This%20is%20really%20annoying!!!%20I%20just%20got%20a%20new%20laptop%20and%20im%20trying%20to%20open%20my%20bills%20spreadsheet%2C%20but%20for%20the%20life%20of%20me%20cant%20get%20the%20file%20to%20open.%20This%20is%20ridiculous!!%20I%20just%20want%20to%20open%20the%20dang%20file.%20Why%20does%20everything%20have%20to%20be%20so%20fricken%20complicated!%3F%3F!%3F!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1902150%22%20slang%3D%22en-US%22%3EBetreff%3A%20Excel%20cannot%20be%20open%20the%20file%20'filename.xlsx'%20because%20the%20file%20format%20or%20file%20extension%20is%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1902150%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F718529%22%20target%3D%22_blank%22%3E%40Muthu69%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3EWith%20your%20permission%20and%20everyone%20involved%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%2C%20if%20I%20can%20recommend.%3C%2FP%3E%3CP%3EIt%20can%20help%20us%20all%20if%20you%20upload%20an%20Excel%20file%2C%20no%20picture.%3C%2FP%3E%3CP%3EYou%20could%20get%20a%20precise%20solution%20much%20faster%20with%20a%20file.%3C%2FP%3E%3CP%3EThis%20would%20also%20be%20a%20blessing%20for%20all%20of%20us%2C%3C%2FP%3E%3CP%3Eas%20we%20can%20understand%20the%20problem%20much%20better%2C%3C%2FP%3E%3CP%3Ea%20win-win%20situation%20for%20everyone.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E*Knowledge%20of%20Excel%20version%20and%20the%20operating%20system%20is%20a%20must%20have%20if%20you%20want%20to%20proposing%20a%20reasonable%20solution%20(Example%3A%20office%20version%20e.g.%202016%20or%202019%20or%20365%20web%20or%20365%20pro%2C%20etc)%20and%20your%20operating%20system%20(e.g.%20Win10%20(2004)%2C%20Win%2010%20(1903)%2C%20Mac%2C%20etc.).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20understanding%20and%20patience%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1922276%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20cannot%20be%20open%20the%20file%20'filename.xlsx'%20because%20the%20file%20format%20or%20file%20extension%20is%20not%20v%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1922276%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F834412%22%20target%3D%22_blank%22%3E%40devindaoson1991%3C%2FA%3E--sorry%20didn't%20work.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

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

27 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.