Excel 2007的Response.contentType [英] Response.contentType for Excel 2007

查看:620
本文介绍了Excel 2007的Response.contentType的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





要导出到Excel,我们使用



1)for Excel 2003

Response.ContentType =application / vnd.ms-excel;



什么是Excel 2007的Response.ContentType。

Hi,

To Export to Excel we use

1)for Excel 2003
Response.ContentType = "application/vnd.ms-excel";

what is Response.ContentType for Excel 2007.

推荐答案

.xlsx文件的内容类型是;

application / vnd.openxmlformats-officedocument.spreadsheetml.sheet
The content type for .xlsx files is;
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet


response.ContentType =application / vnd.openxmlformats-officedocument.spreadsheetml.sheet;

response.AppendHeader(content-disposition;,attachment; filename = Product_Report.xls;);







我遇到了同样的问题...并找到了上述解决方案。

您应该尝试
response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
response.AppendHeader("content-disposition";, "attachment;filename=Product_Report.xls";);



I was suffered with same problem...and found the above solution.
You should try it


这篇关于Excel 2007的Response.contentType的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆