|
Posted by John Dunlop on 01/26/08 08:27
JaxDawg:
> Since the file is XML, which defaults to the browser to open - the
> above code will display the XML as raw XML in a new browser window.
> How to I tell it to open with Excel? or even better, open with any
> compatible spreadsheet (OpenOffice, etc).
If you want to read the data in particular software, you would need to
configure your browser to send the data to that software. Over the
web there is no way to force users to use particular software. You
can suggest presentational information by way of Content-Disposition,
but this is limited to the method of display (e.g., whether or not to
prompt to "Save As") and the filename, and moreover does not enjoy
widespread support.
Are you on an intranet?
> I've played around with ContentType, but perhaps am just not using the
> correct format. Seems like this should be pretty simple - but I'm
> struggling.
The ratified MIME types for XML are defined by RFC3023.
http://www.apps.ietf.org/rfc/rfc3023.html
--
Jock
[Back to original message]
|