Aspose.Cell和NPOI生成Excel文件2
2021-07-08 06:06
标签:name etc tar work exce oct table clear cte NPOI还是比较好用的,引用dll程序集即可 1创建workbook和工作流 2这里是一个多sheet的例子,可以通过循环一个个生成 3工作中的sheet都创建好之后,写入流 4最后返回给浏览器端 Aspose.Cell和NPOI生成Excel文件2 标签:name etc tar work exce oct table clear cte 原文地址:http://www.cnblogs.com/pocn/p/7098048.htmlHSSFWorkbook workbook = new HSSFWorkbook();
MemoryStream ms = new MemoryStream();
1 List
workbook.Write(ms);
byte[] strmByte = ms.ToArray();
ms.Dispose();
Response.ClearContent();
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition","attachment;fileName="+"name.xlsx");
Response.BinaryWrite(strmByte);
下一篇:MVC模型注解
文章标题:Aspose.Cell和NPOI生成Excel文件2
文章链接:http://soscw.com/index.php/essay/102298.html