8

I can rename an Excel file extension from .XLSX to .zip and extract out the xml files.

How do I combine individual Excel xml files back into a single XLSX file?

I tried zipping up the folder and renaming the .zip extension back to .XLSX but then Excel has a problem opening the file.

Jeremy Thompson
  • 1,275
  • 1
  • 12
  • 24
  • 2
    It's *so* useful to be able unpack XLSX/XLSM files and edit them manually, but I always forget how to repack them, thanks for this question having a ready answer is a lifesaver! – Whilom Chime Feb 20 '18 at 23:03

2 Answers2

17

Found it! Seems I was zipping up the entire folder, you need to zip up the three folders and XML file:

_rels
docProps
xl
[Content_Types].xml

Then rename the zip files extension to xslx and it opens fine.

Jeremy Thompson
  • 1,275
  • 1
  • 12
  • 24
-1

You need the zip up:

  1. [Content_Types].xml (file)
  2. _rels (folder)
  3. docProps (folder)
  4. xl (folder)

The Content_Types.xml should be the first file in the archive. You can ensure this, by using the zip/archive utility of your choice, you first add [Content_Types].xml saving the archive (close the archive utility if you like) and then adding the objects (folders).

  • This is the same answer as above. – Toto Dec 29 '22 at 15:47
  • @Toto If the `[Content_Types].xml` is not the first file in the archive, Excel will not open it. So there is a crucial step missing in the answer by Jeremy Thompson – Bastiaan Quast Jan 02 '23 at 12:20
  • This is actually incorrect, here's screenshot to prove it it.https://i.stack.imgur.com/xygQa.png – Jeremy Thompson Jan 10 '23 at 00:10
  • It is definitely correct. Your screenshot doesn't explain anything at all? – Bastiaan Quast Jan 10 '23 at 06:45
  • There are 3 folders and 1 XML file at the parent level, selecting them in order makes no difference. *Content_Types.xml should be the first file in the archive* doesn't make sense as there's only 1 file and 3 folders you zip up., how can you even force it to be the first? – Jeremy Thompson Jan 13 '23 at 04:23
  • It does need to be the first file. The naming of the file is to help with this. However, the way to make it the first file in the archive is simple. Create the archive, add that file, save, then add the folders, save again. – Bastiaan Quast Jan 13 '23 at 06:26
  • I'm going to make a complaint about you downvoting my answer, while is it more correct than your answer, and your comment here clearly shows that you don't know enough about this subject. – Bastiaan Quast Jan 13 '23 at 06:27