![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: XML Output Display: How to open XML with Excel in browser >Thread Next - Re: XML Output Display: How to open XML with Excel in browser Re: XML Output Display: How to open XML with Excel in browserTo: NULL Date: 7/6/2004 3:08:00 PM I found that the <xsl:output media-type=""/> ------------------- media-type: Defines the MIME type of the output. The default is "text/xml" ------------------ However, I tried the following but it did not work. Why? --------------------- <xsl:output method="xml" media-type="Application/vnd.ms-excel"/> --------------------- Thanks a lot. David Carnes wrote: > Qluo: > Whenever I need information about Oracle I ignore their useless website and > go directly to Tom Kyte's website: > http://asktom.oracle.com > > I did a quick search on "content-type Excel" and found a few things of > interest. I am not sure of your environment, but it might give enough to > figure this out, or at least the right words to use when you approach the > admins in control of your environment. > If you're generating the data inside a stored procedure you *might* be able > to use something like this: > owa_util.mime_header( 'image/gif' ); > http://asktom.oracle.com/pls/ask/f?p=4950:8:2359788059827372679::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:232814159006, > > > This *might* help: > http://asktom.oracle.com/pls/ask/f?p=4950:8:2359788059827372679::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:4022241352763, > > Anyway, I didn't dig too deep. Sorry I couldn't be more helpful. Happy > hunting, though. > Caio, > Dave > > > > > "qluo" <jluost1@y...> wrote in message > news:40EA9B28.8080100@y...... > >>The server is not IIS, but the Oracle. I use the Oracle Java XML parser >>for transformation on the server. The parameters are input files and >>output file. The output file is delivered to the browser by the Oracle >>program, which I probably don't have control. >> >>Is there another way to trigger the browser to open Excel? >> >>Thank you very much. >> >>David Carnes wrote: >> >>>Qluo: >>>I am assuming you're performing your transformation on the server, and >> > an > >>>IIS server at that. If it's server-side, but not IIS, the information >>>should apply, but the syntax might be a little different. >>> >>>This might help: >>> >> > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_xl2003_ta/html/odc_XLxmlhowto_.asp > >>>I think the trick is to set the content type: >>>Response.ContentType = "application/vnd.ms-excel" >>> >>>Any modification to the HTTP headers must be done before anything has >> > been > >>>sent down the wire, so don't write anything into the Response buffer >> > before > >>>you set the content type. For example, here's something I've done with >> > a > >>>Word document: >>> >>>dim strFileName >>>strFileName = "a_filename_I_generate.doc" >>>response.ContentType = "application/msword" >>>Response.AddHeader "content-disposition", "attachment; filename=" & >>>strFileName >>> >>>The addHeader bit forces a "Save As" dialog box, so if you don't need >> > that, > >>>don't use it. >>> >>>HTH! >>>Dave >>> >>> >>>"qluo" <jluost1@y...> wrote in message >>>news:40E5A9C2.2030905@y...... >>> >>> >>>>I have a XSL that transforms a XML file and produces another XML output. >>>> >>>>The xml output contains the following lines: >>>> >>>>----------------------- >>>><?xml version="1.0" ?> >>>> <?mso-application progid="Excel.Sheet"?> >>>> <Workbook>... >>>>----------------------- >>>> >>>>If I save the xml output to my local computer then open it, Excel will >>>>be launched and xml file will be opened as an excel file. >>>> >>>>However, if I just display the transformed xml to the browser, the >>>>browser treats it as a xml file without stylesheet, which is the tree >>> >>>view. >>> >>> >>>>HOW CAN I TELL THE BROWSER TO LAUNCH EXCEL INSIDE AND DISPLAY THE XML >>> >>>FILE? >>> >>> >>>>THANK YOU. >>>> >>> >>> >>> > > | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
