cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcelo Ochoa <moc...@ieee.org>
Subject Re: Transforming XML ito open in Excel
Date Fri, 02 Mar 2001 10:54:48 GMT
Thanks Steve for the trick, I'll add it to my samples on-line.
Regards, Marcelo.

>>>>>>>>>>>>>>>>>> Mensaje original
<<<<<<<<<<<<<<<<<<

El 1/3/01, 19.18.12, "Steve Muench" <Steve.Muench@oracle.com> escribió 
sobre el tema Re: Transforming XML ito open in Excel:


> I modified Marcelo's example (Thanks,Marcelo, for the jumpstart!)
> for use as an XSL stylesheet with the XSQL Pages framework
> and found that Excel has a kind of HTML Tables to Excel
> recognizer, so I was able to get column headings by constructing
> <th> table header elements like below, and to avoid the use
> of <xsl:text> to put in spaces by just using <td> tags to "box"
> the data into HTML table cells.

> You might have to slightly modify this stylesheet to
> work with cocoon, but this is the general idea.

> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:output method="html" media-type="application/vnd.ms-excel"/>
>   <xsl:template match="/">
>    <html>
>      <table>
>        <tr><th>EMPNO</th><th>ENAME</th><th>SAL</th></tr>
>        <xsl:for-each select="ROWSET/ROW">
>          <tr>
>            <td><xsl:value-of select="EMPNO"/></td>
>            <td><xsl:value-of select="ENAME"/></td>
>            <td><xsl:value-of select="SAL"/></td>
>          </tr>
>        </xsl:for-each>
>      </table>
>    </html>
>   </xsl:template>

> </xsl:stylesheet>

> ______________________________________________________________
> Steve Muench, Lead XML Evangelist & Consulting Product Manager
> BC4J & XSQL Servlet Development Teams, Oracle Rep to XSL WG
> Author "Building Oracle XML Applications", O'Reilly
> http://www.oreilly.com/catalog/orxmlapp/

> ----- Original Message -----
> From: "William Bagby" <williamb@adone.com>
> To: <cocoon-users@xml.apache.org>
> Sent: Thursday, March 01, 2001 1:41 PM
> Subject: RE: Transforming XML ito open in Excel


> |
> | > > That is awesome.
> | > >
> | > > Is there a way to make it so that the fields in the first row become
> | > > the column names? I am of course making a big assumption
> | > that this can
> | > > be done, because when you import tab-delimited files in
> | > Excel you have
> | > > that option.
> | >
> | > you could modify the XSLT stylesheet to do this.
> | >
> | > - donald
> |
> | At the risk of sounding like an ungrateful whelp...technically, you 
answered
> | my question, because "Is there a way..." is a yes/no question, and you
> | basically said, "yes."  But it doesn't really help me much.
> |
> | So let me try again.
> |
> | How would you modify the XSLT stylesheet so that the fields in the 
first row
> | become
> | the column names?
> |
> |
> |
> |
> | ---------------------------------------------------------------------
> | Please check that your question has not already been answered in the
> | FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> |
> | To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> | For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> |
> |


> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>-- 
Do you know DB Prism look @ http://www.plenix.com/dbprism/
More info? 
- Chapter 21 “Profesional XML Databases” at Wrox Press 
(http://www.wrox.com/)
- Chapter 8 “Oracle & Open Source” by O'Reilly (http://www.oreilly.com/)
Marcelo F. Ochoa
Fac. de Cs. Exactas - UNICEN
Paraje Arroyo Seco - Campus Univ.
(7000) Tandil - AR
Tel.: +54-2293-444430
Fax: +54-2293-444431

Mime
View raw message