Why do I get the ‘Excel cannot open the file ‘(filename).xlsm’ error with a file on Mac but not on Windows?

Posted on


I have been working on a complex Excel file and custom add-in and am attempting to make sure the add-in works on Mac as well as Windows. I’ve managed to get the add-in working when paired with a blank workbook on my Mac VM, but when trying to load the .xlsm file it is intended to work with, I get the infamous

Excel cannot open the file ‘filename.xlsm’ because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.

error message.

The file itself is checked out from git and opens with no problem on my Windows machine, so I don’t believe it’s corrupt. I have however attempted to find the file in ~/Library in order to fix any auto-restore problems (I’ve seen this fix several places online).

I’m also aware that the filetype could be a problem for older versions of Excel, but the Excel installations on both my Windows and Mac machines are new.

I’m sort of at a loss and I’m not sure how to proceed with this issue. It is especially challenging since the vast majority of fixes online are done on Windows and I can’t figure out how to do them on Mac, i.e. Open and Repair or the Export option suggested on this site among others:

I also tried this link.

Does anyone know why I am having this issue or how I can determine the cause?


As it turns out, the file I was attempting to open contained a reference to an add-in file. Once this was removed I was able to open the file without any issues.

Leave a Reply

Your email address will not be published. Required fields are marked *