Aspose.words 替换字符 操作
2015-07-14 01:09
786 查看
var path = Server.MapPath("~/doc/demo.doc");
Document doc = new Document(path);
DocumentBuilder builder = new DocumentBuilder(doc);
//builder.Write("张三");
// var repStr = string.Format("&{0}&", "[客户姓名]");
doc.Range.Replace("[客户姓名]", "张三", false, true);
doc.Range.Replace("[姓名]", "李四", false, true);
doc.Range.Replace("[性别]", "男", false, true);
doc.Range.Replace("[年龄]", "18", false, true);
doc.Save(path);
Document doc = new Document(path);
DocumentBuilder builder = new DocumentBuilder(doc);
//builder.Write("张三");
// var repStr = string.Format("&{0}&", "[客户姓名]");
doc.Range.Replace("[客户姓名]", "张三", false, true);
doc.Range.Replace("[姓名]", "李四", false, true);
doc.Range.Replace("[性别]", "男", false, true);
doc.Range.Replace("[年龄]", "18", false, true);
doc.Save(path);
相关文章推荐
- Raspberry Pi国内稳定镜像源以及修改方法
- ASP.NET MVC搭建项目后台UI框架—9、服务器端排序
- asp.net控件中的reportview不显示
- asp.net 中点击按钮弹出模式对话框,选择值后返回到页面中(window.showModalDialog实现)
- asp.net ToString()格式汇总
- ASP.NET Excel数据导入数据库---2
- Manual Jasper Reports Deployment on JasperReports Server Distilled
- Asp.Net 导入Excel表格
- asp.net treeview遍历递归获取当前节点所有子级(含子级的子级)
- 【翻译】了解ASP.NET MVC的HTML助手
- ASP.NET AJAX
- ASP.NET MVC 路由进阶(之一)
- ASP.NET支持多语言<转>
- 超级简单:ASP.NET Localization (本地化,多语言)
- ASP.NET PipeLine #Reprinted#
- DEV-aspxgridview中的editform中上传的方法
- 如何在ASP.NET中获得客户端IP地址
- ASP.NET MVC程序中动态修改form的Action值
- ASP.NET MVC3 电影示例
- ASP.NET MVC3 电影示例