【发布时间】:2011-12-31 06:14:13
【问题描述】:
我使用 CarlosAG-Dll 为我创建一个 XML-Excel 文件(在 MemoryStream 中)。
Response.ContentType = "application/vnd.ms-excel";
Response.AppendHeader("content-disposition", "myfile.xml");
memory.WriteTo(Response.OutputStream);
我的问题是,我在客户端获得了 myfile.xls (IE) 或 myfile.xml.xls (FF),因此收到了来自 excel 的烦人的安全警告。
我也尝试过使用 application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (xlsx),但它甚至无法打开。
所以我需要剪切 .xml 并将其作为 vnd.ms-excel 发送(如何?)或采用另一种 MIME 类型(但是哪一种?)。
编辑:我发现了一个错误描述here
我想知道这是否仍然开放,为什么?
【问题讨论】:
标签: c# asp.net excel mime-types