Aspose.Words.dll根据模板生成word详解
1、获取word文档内容,把书签替换为文字
Document doc = new Document("模板路径");//载入模板
Aspose.Words.DocumentBuilder builder = new Aspose.Words.DocumentBuilder(doc);
builder.MoveToBookmark("zy");//跳转到书签名是zy的位置
builder.Write("书签位置要替换的文字");
把书签替换为图片:
builder.InsertImage(img, RelativeHorizontalPosition.Page, left, RelativeVerticalPosition.TopMargin, 0, width, height, WrapType.None);
2、动态生成表格
参考:https://www.cnblogs.com/abc101/p/5264280.html
Aspose.Cells中文版文档:https://blog.csdn.net/hao_ds/article/details/38977917 导入导出Excel