C#替换文本字符串中的docx [英] C# to replace strings of text in a docx

查看:212
本文介绍了C#替换文本字符串中的docx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用C#,有没有好办法来查找和替换在的docx文件中的文本字符串,而无需安装在机器上的字?

Using C#, is there a good way to find and replace a text string in a docx file without having word installed on that machine?

推荐答案

是,使用的Open XML 。这里是既解决您的具体问题的文章:创建一个简单的搜索和替换Word 2007的Open XML格式文档

Yes, using Open XML. Here's an article which addresses your specific question: Creating a Simple Search and Replace Utility for Word 2007 Open XML Format Documents

这篇关于C#替换文本字符串中的docx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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