|
@@ -140,12 +140,12 @@ namespace OASystem.API.OAMethodLib.File
|
|
|
{
|
|
|
System.IO.Directory.CreateDirectory(path);//不存在就创建文件夹
|
|
|
}
|
|
|
+ string saveFilePath = string.Format("{0}{1}", path, saveFilName);
|
|
|
|
|
|
- //合并模版,相当于页面的渲染
|
|
|
- doc.MailMerge.Execute(new[] { "PageCount" }, new object[] { doc.PageCount });
|
|
|
//保存合并后的文档
|
|
|
- doc.Save(outputPath);
|
|
|
- return outputPath; //返回下载地址
|
|
|
+ wbook.Save(saveFilePath);
|
|
|
+ saveFilePath = saveFilePath.Replace("C:", AppSettingsHelper.Get("OfficeBaseUrl")); //返回下载地址
|
|
|
+ return saveFilePath; //返回下载地址
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|