-
如何使用DocX 库在 .DOCX 文件中替换一列单词
翻译 maninwest@Codeforge 作者:B. Clay Shannon@Codeproject使用 DocX 库替换 .docx 文件中的字任务我想替换英式英语的拼写为美式口语。例如, 替换 "colour" 为 "color", "centre" 为 "center", "plough" 为"plow", 等。我可以使用查找>替换来一个一个地替换,但是很麻烦。所以,我找到一个库 。为了使用这个 docx库,只需从 这里 下载(docx.dll)。在你的项目中添加到它的引用,然后添加此 using子句:using Novacode;
首先需要加载具有”错误"拼写的文档:string filename = string.Empty;
DialogResult result = openFileDialog1.ShowDialog();
if (result == DialogResult.OK)
{
filename = openFileDialog1.FileName;
}
else
{
MessageBox.Show("No file selected - hasta la vista and Ciao, baby!");
return;
}
using (DocX document = DocX.Load(filename))
{
document.ReplaceText("travelled", "traveled");
document.Save();
}
我们当然想以此完成所有词汇替换。首先,我们需要有一列单词,这样编码: 请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
- 2022-01-25 21:24:19下载
- 积分:1
-
天线性能仿真,功能强大,界面化处理,能实现技术所有功能...
天线性能仿真,功能强大,界面化处理,能实现技术所有功能-Antenna performance simulation, powerful, interface-based treatment that can realize all the features of technology
- 2023-06-12 00:35:03下载
- 积分:1
-
i.MX27_ADS_BSP_15_Windows_Embedded_CE_6_Reference_Manual I.MX27 use the latest d...
i.MX27_ADS_BSP_15_Windows_Embedded_CE_6_Reference_Manual I.MX27 最新的WINCE6.0 BSP使用说明文档-i.MX27_ADS_BSP_15_Windows_Embedded_CE_6_Reference_Manual I.MX27 use the latest documentation WINCE6.0 BSP
- 2023-07-15 07:25:04下载
- 积分:1
-
springboot商城管理
springboot商城管理后端管理Spring提供的一个用于简化JPA开发的框架Spring Data JPA能干什么: 可以极大的简化JPA的写法,可以在几乎不用写实现的情况下,实现对数据的访问和操作。除了CRUD外,还包括如分页、排序等一些常用的功能。 Spring Data JPA有什么 主要来看看Spring Data JPA提供的接口,也是Spring Data JPA的核心概念: 1:Repository:最顶层的接口,是一个空的接口,目的是为了统一所有Repository的类型,且能让组件扫描的时候自动识别。 2:CrudRepository :是Repository的子接口,提供CRUD的功能 3:PagingAndSortingRepository:是CrudRepository的子接口,添加分页和排序的功能 4:JpaRepository:是PagingAndSortingRepository的子接口,增加了一些实用的功能,比如:批量操作等。 5:JpaSpecificationExecutor:用来做负责查询的接口 6:Specification:是Spring Data JPA提供的一个查询规范,要做复杂的查询,只需围绕这个规范来设置查询条件即可
- 2022-02-03 21:06:45下载
- 积分:1
-
罗马消除编码器
简单的转换器罗马数字。按 Esc 键退出。在收货编辑 text.example 如何处理与 textAn 示例如何从模板创建对话框键入任何数字。工具都包括在内。
- 2023-05-22 13:25:03下载
- 积分:1
-
一个加壳工具的源码,是学习高级汇编技巧的了例子
一个加壳工具的源码,是学习高级汇编技巧的了例子-A source加壳tool is to learn advanced techniques to compile the examples
- 2022-03-23 18:54:49下载
- 积分:1
-
Week Ligong Singlechip developed manual, the specific data manual see Zhou Ligon...
周立功公司开发的单片机手册,具体的数据手册见周立功网站下载。-Week Ligong Singlechip developed manual, the specific data manual see Zhou Ligong website.
- 2022-06-14 12:38:57下载
- 积分:1
-
国外结构计算程序,FORTRAN高级语言编写,主要用于结构分析。...
国外结构计算程序,FORTRAN高级语言编写,主要用于结构分析。-abroad structure calculation procedures, the High FORTRAN language, mainly for structural analysis.
- 2022-02-05 22:50:48下载
- 积分:1
-
简单的计算器编写程序,用了GUI,可以实现+
简单的计算器编写程序,用了GUI,可以实现+-*/的运算-Simple calculator programming, using the GUI, can be achieved+-*/Computing
- 2022-07-11 02:24:36下载
- 积分:1
-
一个特别的菜单,通过学习 你会有所提高
一个特别的菜单,通过学习 你会有所提高-a special menu, you will learn through improved
- 2022-02-07 23:29:53下载
- 积分:1