Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XML Output Display: How to open XML with Excel in browser

From: "David Carnes" <davidc@----------------.--->
To: NULL
Date: 7/6/2004 4:35:00 PM
Qluo:
I found an example on Microsoft's website in which they read the MIME type
from the result of the transformation and then using that to set the
content-type for the HTTP traffic:

http://tinyurl.com/2zzwp

I did a very quick search on Google, and every reference I found to setting
the content-type on an Oracle web server was to do it through script.  So
somewhere in there is a spot that you should be able to set the MIME type.
Perhaps you could start another thread, look at the Oracle newsgroups, or
ask the admins in control of the servers how to set the content-type header.
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&group=comp.databases.oracle

Sorry I couldn't be of more use, but I am interested to know if you find out
anything.

Ciao,
Dave



"qluo" <jluost1@y...> wrote in message
news:40EAF874.1030203@y......
> 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.
> >>>>
> >>>
> >>>
> >>>
> >
> >
>




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent