How will i extract the data from the docx file using DocumentFormat.OpenXml -details below

微笑、不失礼 提交于 2019-12-01 01:52:13
sdr

This answer is late I know but after years reading this site I find myself in a position to help.

As the previous answer stated it is just as simple as opening the file as a zip and examining the contents. This approach can be limiting if you ever intend to go beyond reading some simple data out.

If you haven't already, checkout the Open XML Productivity Tool from Microsoft. It is installed as part of the openxml sdk. It makes it alot easier to find what you are looking for.

Another excellent resource is the PowerTools for OpenXML basically an open source collection of powershell cmdlets. It is the best example ive seen of coding against the open xml sdk.

-SDR

you have to explore the DocumentFormat.OpenXml for the extraction of your data from the docx file. Or Another method is that,

First convert the extension of the docx file to .zip . After opening the zip file open the file document.xml. In this file you will find all your data . Now you just need to do is to read the xml file in c# and extract the data. You use xmlDocument class and extract The data

I think it will be useful.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!