.net MVC使用Aspose.Words 获取文本域获取文档
controller 1 using Aspose.Words; 2 using Aspose.Words.Saving; 3 using System.IO; 4 5 6 /// <summary> 7 /// 获取导入Word 文档 8 /// </summary> 9 /// <param name="PaperId"></param> 10 /// <returns></returns> 11 public ActionResult GetWord(int PaperId) 12 { 13 try 14 { 15 var __data = _paperApp.GetWord(PaperId); 16 string tempPath = Server.MapPath("~/Template/导出模版.docx"); 17 string outputPath = Server.MapPath("~/Resources/Output/模版_temp.doc"); 18 //载入模板 19 var doc = new Document(tempPath); 20 //提供数据源 21 String[] fieldNames = new String[] { "PaperName", "PaperTypeName", "SingleChoiceCount",