zwei1121

博客园 首页 新随笔 联系 订阅 管理

当从浏览器返回一个文件时,需要指定ContentType,以下是Office2007对应的值:

  "application/vnd.openxmlformats-officedocument.wordprocessingml.template" (for .dotx files)

  "application/vnd.openxmlformats-officedocument.presentationml.presentation" (for .pptx files)

  "application/vnd.openxmlformats-officedocument.presentationml.slideshow" (for .ppsx files)

  "application/vnd.openxmlformats-officedocument.presentationml.template" (for .potx files)

  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" (for .xlsx files)

  "application/vnd.openxmlformats-officedocument.spreadsheetml.template" (for .xltx files)

  相对于Office2003是这样的

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

 

'Excel 2003 : "application/vnd.ms-excel"

'Excel 2007 : "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"

posted on 2014-10-15 09:03  zwei  阅读(607)  评论(0编辑  收藏  举报