4 ms·
The last time I've done this I just have a link that sets the content type header to something like text/excel (that's not it exactly i don't think, google for
by encoderer 14y ago
The last time I've done this I just have a link that sets the content type header to something like text/excel (that's not it exactly i don't think, google for it) and on Windows at least it always worked to open the page in Excel. And if you use an HTML table, excel will just open it as a spreadsheet, including any CSS text formatting you use.
Is that what you meant, or did I answer a different question?
- jackalope 14y agoUnfortunately, Excel can't cope with some of the more modern authentication systems being deployed on the web, so it's no longer as easy as providing a URL that spits out an HTML table, if you have to protect sensitive data behind a login (I think it can handle HTTP-Basic, but not anything requiring redirects; this may have changed in recent versions).
- flomo 14y agoYep. Believe you also need to set something like this: Content-Disposition: attachment; filename="foo.xls"
- stan_rogers 14y agoIt's "application/vnd.ms-excel" for recent versions.