I thought that this would be easy but...
I saved an excel 2002 spreadsheet as xml (see below).
I wrote a simple xsl file (also below) which I thought would access cell date.
However instead it outputs all data from the xml file (incl. doc properties, cell formatting etc etc)
I dont have any control over the nodes.
Can anyone see what I am doing incorrectly.
Ps I am using xml parser 4 to transform xml to xsl
<?xml version="1.0"?>
<Workbook xmlns="urn:schemas-microso
ft-com:off
ice:spread
sheet"
xmlns:o="urn:schemas-micro
soft-com:o
ffice:offi
ce"
xmlns:x="urn:schemas-micro
soft-com:o
ffice:exce
l"
xmlns:ss="urn:schemas-micr
osoft-com:
office:spr
eadsheet"
xmlns:html="
http://www.w3.org/TR/REC-html40">
<Worksheet ss:Name="Sheet1">
<Table ss:ExpandedColumnCount="3"
ss:ExpandedRowCount="2" x:FullColumns="1"
x:FullRows="1" ss:StyleID="s21">
<Column ss:StyleID="s21" ss:AutoFitWidth="0" ss:Width="126"/>
<Column ss:StyleID="s21" ss:AutoFitWidth="0" ss:Width="174"/>
<Column ss:StyleID="s21" ss:AutoFitWidth="0" ss:Width="249"/>
<Row ss:AutoFitHeight="0" ss:Height="201.75">
<Cell><Data ss:Type="String">Outside Heading</Data></Cell>
<Cell><Data ss:Type="String">William Butler Yeats - poetry, poems</Data></Cell>
<Cell ss:StyleID="s22"><Data ss:Type="String">William Butler Yeats (Willie as he was more commonly and more appropriately called - born Dublin, Ireland - died Roqueborne, France - buried under Ben Bulben, Ireland) </Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microso
ft-com:off
ice:excel"
>
<Print>
<ValidPrinterInfo/>
<HorizontalResolution>600<
/Horizonta
lResolutio
n>
<VerticalResolution>600</V
erticalRes
olution>
</Print>
<Selected/>
<ProtectObjects>False</Pro
tectObject
s>
<ProtectScenarios>False</P
rotectScen
arios>
</WorksheetOptions>
</Worksheet>
</Workbook>
xsl file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="
http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="Workbook/Worksheet"
>
<paragraphs>
<xsl:for-each select="//Data">
<p>
<xsl:value-of select="text()"/>
</p>
</xsl:for-each>
</paragraphs>
</xsl:template>
</xsl:stylesheet>
Start Free Trial