aspose.word主要是通过把读取出来的数据放到datatable里,在datable里做相应的格式的调整,再导出到word文档里.mvc和webform最后导出的语句略有不同,在mvc的controller,用的是base.File,对应的是FileContentResult,在webform里用的是Response.写法分别为: //在WebForm中,保存文档到流中,使用Response. BinaryWrite输出该文件 var docStream…
1 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using Microsoft.Office.Interop.Word; namespace QHRMS // 根据自己需要修改命名空间 { public class CreateWo…