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");

猜你喜欢

转载自tiramisu110.iteye.com/blog/2357464
今日推荐