Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conversion between .xlsx and .zip

Tags:

openxml

I want to manipulate Office Open XML format of Excel, but even just conversion between the .zip and .xlsx generates errors:

  1. create a very simple test.xlsx by Excel
  2. Right-click test.xlsx => Rename as text.xlsx.zip
  3. Right-click text.xlsx.zip => Extract all to a folder named text.xlsx
  4. Right-click text.xlsx folder => Send to => Compressed (zipped) folder named text_2.xlsx.zip
  5. Right-click text_2.xlsx.zip => Rename as text_2.xlsx
  6. open text_2.xlsx with Excel, then I got the following errors:

enter image description here enter image description here

Does anyone know what's wrong there?

like image 596
SoftTimur Avatar asked Mar 13 '23 00:03

SoftTimur


1 Answers

Xlsx files are just ordinary zip file and it is definitely possible to do what you are trying to do.

Does anyone know what's wrong there?

I would guess step 4:

  1. Right-click text.xlsx folder => Send to => Compressed (zipped) folder named text_2.xlsx.zip*

You will need to zip the contents on the folder and not the folder itself. The resultant zip file should have the [Content_Types].xml files at the top level with no parent folder.

enter image description here

like image 139
jmcnamara Avatar answered May 09 '23 23:05

jmcnamara