码迷,mamicode.com
首页 > Web开发 > 详细

asp.net mvc用aspose.cells 导出xlsx格式的excel。无残留

时间:2017-12-03 13:02:15      阅读:399      评论:0      收藏:0      [点我收藏+]

标签:text   options   xlsx   导出   system   attach   creat   content   pos   

 public void Export()
        {
            HttpResponse Response = System.Web.HttpContext.Current.Response;
            // Load your source workbook
            Workbook workbook = new Workbook(); // Creating a Workbook object
            var sheet = workbook.Worksheets[0];
            sheet.Cells[0, 0].PutValue(1);
            if (Response != null)
            {
                // Save in Xlsx format
                workbook.Save(Response, "test.xlsx", ContentDisposition.Attachment, new OoxmlSaveOptions());
                Response.End();
            }
        }

 

asp.net mvc用aspose.cells 导出xlsx格式的excel。无残留

标签:text   options   xlsx   导出   system   attach   creat   content   pos   

原文地址:http://www.cnblogs.com/gaocong/p/7965565.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!