如何将我从DOCX文件中使用以下DocumentFormat.OpenXml -details提取数据 [英] How will i extract the data from the docx file using DocumentFormat.OpenXml -details below

查看:1153
本文介绍了如何将我从DOCX文件中使用以下DocumentFormat.OpenXml -details提取数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有,加入XML架构创建的docx文件。我给你的docx文件的链接。

I have a Docx file created by adding the xml schema. I am giving you the link of the docx file .

现在我想extract--收件人,发件人,标题,正文。
目前我使用的图书馆DocumentFormat.OpemXml。
但没有成功。
任何一个可以建议我的步骤。

now I want to extract-- To,From,heading,body. Currently I am using the Library DocumentFormat.OpemXml. But didnt succeed. Can any one suggest me the steps .

推荐答案

您探索DocumentFormat.OpenXml为您的数据从DOCX文件中提取。
或另一种方法是,

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

首先转换的docx文件为.zip的扩展。
打开zip文件打开该文件后document.xml。
在这个文件中,你会发现所有的数据。
现在你只需要做的是阅读C#中的XML文件,并提取数据。
。您使用XmlDocument类,并提取数据。

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

我认为这将是有益的。

这篇关于如何将我从DOCX文件中使用以下DocumentFormat.OpenXml -details提取数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆