-
如何使用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
-
创建Delphi按钮组件
创建分量 Delphi.This 示例中的按钮教你如何快速创建一个 Delphi 组件。简而言之,您可以开发组件在 objetc pascal 语言中最小的工作量。
- 2023-07-28 14:55:03下载
- 积分:1
-
Information on the download page to download data from multiple sites of informa...
下载网页资料,下载多个网站的数据信息,实现数据共享-Information on the download page to download data from multiple sites of information, data sharing
- 2022-03-24 04:44:17下载
- 积分:1
-
实现两个聚类中心之间的最小距离,如小于此数,两个聚类进行合并的功能。...
实现两个聚类中心之间的最小距离,如小于此数,两个聚类进行合并的功能。-This is a program of achiving the least distance of two clustering middle as the function of conbining two clustering less than some number.
- 2023-07-15 09:30:04下载
- 积分:1
-
AVR定时器 时灯闪烁一秒一次
按时打发上的发的是飞
AVR定时器 时灯闪烁一秒一次
按时打发上的发的是飞-AVRtimer light one second one time
adsfadsfadsfadsfa
- 2022-03-17 06:04:08下载
- 积分:1
-
Guangdong weight charges DLL developed using BCB2007
广东计重收费DLL
使用BCB2007开发-Guangdong weight charges DLL developed using BCB2007
- 2022-03-13 02:06:31下载
- 积分:1
-
This is a program used in class. It s applicable to beginner. if you study JAVA...
这个也是上课用的程序,适合于初学者用,对于java的初学者,建议多看源码。-This is a program used in class. It s applicable to beginner. if you study JAVA just now,I suggest you read some source code.
- 2022-04-24 07:54:56下载
- 积分:1
-
WPF获取内存CPU
WPF获取内存CPU,曲线是使用的Visifire控件,可以缩放拉伸,根据时间动态变化,界面精美漂亮。
- 2022-04-16 19:57:11下载
- 积分:1
-
自定义的DatagridView控件,提供了常见的几种常见操作的自定义函数。
主要函数
GetValue:获取指定行和列的Cell Value
Se...
自定义的DatagridView控件,提供了常见的几种常见操作的自定义函数。
主要函数
GetValue:获取指定行和列的Cell Value
SetValue:设置指定行和列的Cell Value
-DatagridView custom controls, provides a common operation of some common self-defined function. The main function GetValue: access to the specified rows and columns of the Cell Value SetValue: Set the specified rows and columns of the Cell Value
- 2022-07-16 21:00:39下载
- 积分:1
-
可用仿真视频质量的软件,可与NS相结合使用,对工程和学术研究都十分有用.
可用仿真视频质量的软件,可与NS相结合使用,对工程和学术研究都十分有用.-Video quality available simulation software, can be used in conjunction with the NS phase, the engineering and academic research are very useful.
- 2023-02-19 01:35:04下载
- 积分:1