Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to unzip docx file using C#?

Tags:

c#

ms-word

How to unzip docx file using C#?

like image 867
Mohamed Kamal Avatar asked Dec 20 '22 08:12

Mohamed Kamal


2 Answers

The new Office file extensions (docx,potx,xlsx,etc) turning into zip files when they are uploaded to a web server and then downloaded.

These file formats are now using an Open XML file format system so they are more compatible with other office programs from Google, Open Office...etc. Essentially they are zip files that are full of XML files that when opened with a proper application turn into a friendly word document.

I stole this full of shame from here where you can find full info.

I hope this answer will help you and all the ignorant people that made fun of you and negative voting your question without even knowing the answer.

like image 153
Dummy01 Avatar answered Jan 09 '23 13:01

Dummy01


If you mean docx files, they're basically just zip files created with a particular convention.

Look into the Packaging API.

like image 45
p.s.w.g Avatar answered Jan 09 '23 13:01

p.s.w.g