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

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация