Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are EXCEL XLSM format no longer a valid ZIP format?

Files saved in Excel as XLSM files are no longer valid ZIP files, preventing editing of the Ribbon.

XLSM files saved on or prior to May 23, 2014, can be renamed .ZIP and edited.

XLSM files saved after May 23, 2014, cannot be renamed .ZIP and edited, but rather generate the error message that the file is a corrupted archive. Both Windows Explorer and WinZip generate the same error condition, though the error message varies slightly.

Yes, there are macros in the files; but even opening an old file with Macros (and VBA) disabled and immediately Saving As a new name generates a corrupted file.

I have also tested on 2 other machines in our corporate group, with the same results, so it is not a corruption just on my workstation.

Office Diagnostics reports no problems with EXCEL.

Any thoughts on causes or solutions?

Update

Let's be clear on my test process:

  1. I rename an XLSM file saved on May 23 to .ZIP; this creates a zipped archive which both WinZip and Windows Explorer can open successfully. I then undo the rename to make the file an XLSM again.
  2. I open the file above in EXCEL-2007 and do not enable macros or VBA. I save this with a new filename as an XLSM file.
  3. I rename the file saved in step (2) as a .ZIP file. This file no longer opens in either WinZip or Windows Explorer, but generates the error message above.
  4. I repeat steps 1 through 3 above on the workstations of two other colleagues - same result exactly.

Update #2
The problem seems to be file-related in some way, as saving an empty workbook as an XLSM still works. I will investigate more.

like image 788
Pieter Geerkens Avatar asked Jun 02 '14 13:06

Pieter Geerkens


1 Answers

The problem is that one or more of the sheets are password protected. Unprotect the sheets, then save as xlsm, rename to .zip and voila, XML structure now appears.

Update: Actually, it was an inconsistent setting of password-protection for the workbook rather than any worksheet.

like image 53
Santi Avatar answered Oct 15 '22 23:10

Santi