![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - 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/2/2004 3:10:00 PM 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 | |||||
|
