Here are some info. about Content Type/Mime Type for Office 2007.
The following is the Content Type/Mime Type for Office 2007:
1) .docm,application/vnd.ms-word.document.macroEnabled.12
2) .docx,application/vnd.openxmlformats-officedocument.wordprocessingml.document
3) .dotm,application/vnd.ms-word.template.macroEnabled.12
4) .dotx,application/vnd.openxmlformats-officedocument.wordprocessingml.template
5) .potm,application/vnd.ms-powerpoint.template.macroEnabled.12
6) .potx,application/vnd.openxmlformats-officedocument.presentationml.template
7) .ppam,application/vnd.ms-powerpoint.addin.macroEnabled.12
8) .ppsm,application/vnd.ms-powerpoint.slideshow.macroEnabled.12
9) .ppsx,application/vnd.openxmlformats-officedocument.presentationml.slideshow
10) .pptm,application/vnd.ms-powerpoint.presentation.macroEnabled.12
11) .pptx,application/vnd.openxmlformats-officedocument.presentationml.presentation
12) .xlam,application/vnd.ms-excel.addin.macroEnabled.12
6) .potx,application/vnd.openxmlformats-officedocument.presentationml.template
7) .ppam,application/vnd.ms-powerpoint.addin.macroEnabled.12
8) .ppsm,application/vnd.ms-powerpoint.slideshow.macroEnabled.12
9) .ppsx,application/vnd.openxmlformats-officedocument.presentationml.slideshow
10) .pptm,application/vnd.ms-powerpoint.presentation.macroEnabled.12
11) .pptx,application/vnd.openxmlformats-officedocument.presentationml.presentation
12) .xlam,application/vnd.ms-excel.addin.macroEnabled.12
13) .xlsb,application/vnd.ms-excel.sheet.binary.macroEnabled.12
14) .xlsm,application/vnd.ms-excel.sheet.macroEnabled.12
15) .xlsx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
16) .xltm,application/vnd.ms-excel.template.macroEnabled.12
17) .xltx,application/vnd.openxmlformats-officedocument.spreadsheetml.template
For ASP.Net implementation, it goes like this:
e.g:
string attachment = "attachment; filename=report.xlsx";
Response.ClearContent();
Response.AddHeader("content-disposition", attachment);
Response.ContentType = ".xlsx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet ";
StringWriter sw = new StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
Control.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
I hope this could help you.
Regards,
Shaper Jabneel
14) .xlsm,application/vnd.ms-excel.sheet.macroEnabled.12
15) .xlsx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
16) .xltm,application/vnd.ms-excel.template.macroEnabled.12
17) .xltx,application/vnd.openxmlformats-officedocument.spreadsheetml.template
For ASP.Net implementation, it goes like this:
e.g:
string attachment = "attachment; filename=report.xlsx";
Response.ClearContent();
Response.AddHeader("content-disposition", attachment);
Response.ContentType = ".xlsx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet ";
StringWriter sw = new StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
Control.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
I hope this could help you.
Regards,
Shaper Jabneel