Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get IE to open XML files in Excel instead of displaying in IE

Status
Not open for further replies.

PaulCoop

Programmer
Apr 3, 2001
31
GB
Hi,

Currently we are upgrading our Oracle Forms 6i application from client/server model to web model. We use Oracle Reports that can output in a varity of formats. My (internal custom) requires to output a particular report in Excel (not one of the formats supported by 6i). Previously they would save the report as XML and open in Excel. In the new web model I can get the report to directly output as XML but IE parses this XML and tries to display it within IE (standard IE behaviour). What I would like to do is change the way IE opens XML files and have it either open directly in Excel or to ask what the user wishes to open the file with. My PC's current file association for XML files is another application altogether so I know that altering the file associations is not going make a difference. I assume it is going to be a registry setting.

Can any one point me in the right direction?

Paul Cooper
 
I have the same issue with a custom Excel export as .XML. If I use a .XLS suffix, Excel 2007 will display a message about the file being in a "different format than specified by the file extension", but still open it ok if you click 'Yes'.
Oddly enough, Office 2008 on a Mac opens it without complaints as an .XLS. I think Office 2003 on PC also (heard this but haven't verified it).
Not really a solution but thought I'd pass this on.
 
May have found a solution! Add this tag right under the <?xml> tag:

<?mso-application progid="Excel.Sheet"?>

 
rhett135 wrote:

[tab]May have found a solution! Add this tag right under the <?xml> tag:

[tab]<?mso-application progid="Excel.Sheet"?>

Thanks,

I added that to the XML Prolog Value parameter of the Oracle Report where it has the xml header. This helps a bit but unfortunately IE is still overriding the suggestion of the application to use and displays the standard XSLT reformat version of the file.

Where that tag does help is in Windows Explorer where the file now has a Excel icon and opens straight into Excel when double-clicked on.

Still looking for a way to stop IE's XML behaviour.

Paul
 
Assuming that this is Windows XP, to change IE's behavior, you'll need to:

Open Windows explorer, go to Tools, Folder Options, File Types tab. Scroll down to and select the XML file type and click the Change button. Change to Excel. However, this might cause problems when trying to use xml files for things other than excel. You might also need to visit the Advanced button and check the 'Confirm Open after download'.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top