When a file is returned from a browser, you must specify the contenttype. the following values are for 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)
Compared with office2003
Response. contenttype = "application/vnd. MS-excel"
'Excel 2003: "application/vnd. MS-excel"
'Excel 2007: "application/vnd. openxmlformats-officedocument.spreadsheetml.sheet"
Microsoft Office 2007 contenttype