9
votes

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.

1
Which version of Office? - Rory
While this does not answer your question, perhaps provides a workaround so you can edit the Ribbon XML -- have you tried editing the XML in the CustomUI XML Editor? - David Zemens
It's a tool recommended by the Microsoft MVPs like Ron de Bruin: msdn.microsoft.com/en-us/library/ee633442(v=office.11).aspx but if that still is a problem, does this happen to all files? If so, can you create an empty XLSM file and upload to Google Docs or another public location? - David Zemens
Also see this, it's possible during your manual editing of the XML that perhaps you inadvertently corrupted the structure of the file? jeromyanglim.blogspot.com/2009/09/… - David Zemens
@DavidZemens: (1) I have one higher priority today to finish off first, then will follow that up. (2): See Update to question. - Pieter Geerkens

1 Answers

3
votes

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.