Want XML file to open in spreadsheet, not browser... how to?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have a spreadsheet saved as an XML spreadsheet so I can manipulate
it easier (and don't need COM).  When I'm done, I want to display to
the user.  Currently, I'm using simple JavaScript in my PHP file:
   echo '<script type="text/javascript"> window.open("'.$file_nm.'")</

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).

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

Thanks in advance.

Re: Want XML file to open in spreadsheet, not browser... how to?


Quoted text here. Click to load it

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?

Quoted text here. Click to load it

The ratified MIME types for XML are defined by RFC3023.



Site Timeline