打开点文件与处理OpenXML [英] Opening Dot File with OpenXML

查看:189
本文介绍了打开点文件与处理OpenXML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要上打开DOT(word文档模板)文件时,请更换填料并将其保存为文档文件。

I need to work on opening a DOT (word document template) file, replace the fillers and save it as Document file.

在打开点文件我得到的文档文件已损坏。

On opening DOT file I am getting "Document File is Corrupted".

是否有可能使用使用的OpenXML文件DOT工作。

Is it possible to work with DOT file using OpenXML.

更新:我现在的储蓄DOT文件作为XML(手动使用另存为...)。重命名文件回点,所以它是建立在的WordML XML文件。仍然试图通过OpenXML可以打开它给我同样的错误。

UPDATE: I am saving DOT file as XML (manually using "Save as.."). Renaming file back to dot, so it is XML file built on WordML. Still trying to open it through OpenXML giving me the same error.

推荐答案

OpenXML的在Office 2007的新格式使用(.DOTX和.DOCX)。
WordML中是一个年纪大一点,不能与OpenXML的图书馆使用。

OpenXML is used in the new formats of Office 2007 (.dotx and .docx). WordML is a bit older and cannot be used with the OpenXML libraries.

您可以加载的WordML文件作为一个XmlDocument或将其加载到一个字符串,如果你知道你要更换什么样的数据。

You can load a WordML file as an XmlDocument or load it into a string if you know exactly what data you want to replace.

这篇关于打开点文件与处理OpenXML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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