此篇博文是用后端技术实现,前端实现请看我另一篇博文



string serverPath = path + "/Export/ywRpt/" + dtAllRpt.Rows[i]["EnglishName"].ToString() + ".docx";//使用模板路径
downLoadPath = path + "/Export/ywRptDownload/" + DateTime.Parse(stime).ToString("yyyyMM") + "/" + sstation + "/" + dtAllRpt.Rows[i]["EnglishName"].ToString() + ".docx";//下载文件路径;
string p = path + "/Export/ywRptDownload/" + DateTime.Parse(stime).ToString("yyyyMM") + "/" + sstation + "/";//创建文件夹路径
if (!System.IO.File.Exists(p))
{
Directory.CreateDirectory(p); //如果文件夹不存在,则创建
}
//复制一份
File.Copy(serverPath, downLoadPath, true);
Aspose.

本文介绍了一种使用Aspose.Words库批量生成及合并Word文档的方法,包括文档复制、书签替换、文档合并及目录生成等功能。

6946

被折叠的 条评论
为什么被折叠?



