I'm trying to convert a folder of xml that was created by unzipping an excel file back into an excel .xlsx. But I get the error
The actual file I want to recreate is a fairly large macro-enbled .xlsm spreadsheet created with Excel 2016. I am using the xml format to archive in a git repository in order to provide version control. However, restoring a version from the archive requires that I can reverse the process.The workbook cannot be opened or repaired by Microsoft Excel because it is corrupt
A minimal example with a simple spreadsheet reproduces this issue:
**A minimal reproducible example to generate this error:**
- Create a new blank spreadsheet in Excel
- Enter "test" in cell A1
- Save as `test.xlsx`
- Rename file to `test.zip`
- Unzip `test.zip` as a folder named `test`
- Compress `test` into `test_new.zip`
- Rename `test_new.zip` as `test_new.xlsx`
- Open `test_new.xlsx` with Excel
I am using Excel 2016. For zipping and unzipping I have tried 7zip, WinZip and PeaZip, all with the same result.
What am I doing wrong, and how can I turn unzipped excel workbooks back into their original form?
Bookmarks