`
tiramisu110
  • 浏览: 24424 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

NOPI导出 Excel在“.xlsx”的部份内容有问题

阅读更多

NOPI导出 Excel在“.xlsx”的部份内容有问题。你要我们尽可能恢复吗?

 

                MemoryStream ms = new MemoryStream();

                workbook.Write(ms);

                HttpResponseMessage response = new HttpResponseMessage();

                response.StatusCode = HttpStatusCode.OK;

               

                response.Content = new ByteArrayContent(ms.GetBuffer());

                response.Content.Headers.ContentLength = long.Parse(ms.ToArray().Length.ToString());

                response.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");

                response.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment");

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics