What is correct content-type for excel files?

taw picture taw · May 30, 2010 · Viewed 555.2k times · Source

I want excel files on a website to open in Excel when clicked, not get saved on desktop, or get opened embedded in a browser etc. Now obviously it all depends on how everything is configured for each user, but what's the best Content-Type and other settings to achieve just that most of the time?

Answer

Mark Baker picture Mark Baker · May 30, 2010

For BIFF .xls files

application/vnd.ms-excel

For Excel2007 and above .xlsx files

application/vnd.openxmlformats-officedocument.spreadsheetml.sheet