Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: CREATING MULTIPLE WORKSHEETS PER EXCEL WORKBOOK USING XSLT CREATING MULTIPLE WORKSHEETS PER EXCEL WORKBOOK USING XSLTTo: NULL Date: 9/2/2008 5:09:00 AM
Hi everybody,
My query is on how multiple worksheets per excel file can be created using
xslt programming.
From my report program i call the xslt transformation passing an internal
table. Based on the changes in the values of a particular field in the table,
multiple worksheets are to be created in a single excel file.
A snippet of the code ive generated is displayed below .But i get the error
saying its unable to open the file. I need to know where exactly to place the
<for-each select> and <worksheet> statements in order to successfully
implement the solution. Would greatly appreciate any help offerred in this
direction. Thanks
<xsl:template match="/">
<workbook>
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
</ExcelWorkbook>
<xsl:apply-templates />
</Workbook>
</xsl:template>
<xsl:template match="asx:values">
<xsl:for-each select="ROWS/ZWORKSHEET">
<Worksheet ss:Name="FIRSTCOL">
<Table ss:ExpandedColumnCount="10" x:FullColumns="1"
x:FullRows="1" ss:DefaultColumnWidth="66" ss:DefaultRowHeight="14.25">
<Row xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<Cell ss:StyleID="s23"><Data ss:Type="String">SAP Material
Number</Data></Cell>
<Cell ss:StyleID="s23"><Data ss:Type="String">CLP</Data></Cell>
</Row>
</Table>
</Worksheet>
</xsl:for-each>
</xsl:template>
</xsl:transform>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
