OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Convertion of Microsoft Excel XML format

[ Lists Home | Date Index | Thread Index ]

Hello,

I have Excel 2002 installed. There are some couple of worksheets in a workbook. Each worksheets consists of a plain table (with rows headers) filled with some data. Something like that:

<?xml version="1.0"?>
<Workbook 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";>
...
 <Worksheet ss:Name="Sheet1">
  <Table ss:ExpandedColumnCount="3" ss:ExpandedRowCount="3" x:FullColumns="1"
   x:FullRows="1">
   <Column ss:Index="3" ss:Width="53.25"/>
   <Row>
    <Cell><Data ss:Type="String">c1</Data></Cell>
    <Cell><Data ss:Type="String">c2</Data></Cell>
    <Cell><Data ss:Type="String">c3</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="Number">1</Data></Cell>
    <Cell><Data ss:Type="String">a</Data></Cell>
    <Cell ss:StyleID="s21"><Data ss:Type="DateTime">2003-06-11T00:00:00.000</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="Number">2</Data></Cell>
    <Cell><Data ss:Type="String">b</Data></Cell>
    <Cell ss:StyleID="s21"><Data ss:Type="DateTime">2003-06-12T00:00:00.000</Data></Cell>
   </Row>
  </Table>
...
 </Worksheet>
 <Worksheet ss:Name="Sheet2">
  <Table ss:ExpandedColumnCount="3" ss:ExpandedRowCount="3" x:FullColumns="1"
   x:FullRows="1">
   <Row>
    <Cell><Data ss:Type="String">c1</Data></Cell>
    <Cell><Data ss:Type="String">c2</Data></Cell>
    <Cell><Data ss:Type="String">c4</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">a</Data></Cell>
    <Cell><Data ss:Type="String">aa</Data></Cell>
    <Cell><Data ss:Type="Number">10</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">b</Data></Cell>
    <Cell><Data ss:Type="String">bb</Data></Cell>
    <Cell><Data ss:Type="Number">21</Data></Cell>
   </Row>
  </Table>
...
 </Worksheet>
 <Worksheet ss:Name="Sheet3">
  <Table ss:ExpandedColumnCount="3" ss:ExpandedRowCount="3" x:FullColumns="1"
   x:FullRows="1">
   <Row>
    <Cell><Data ss:Type="String">c2</Data></Cell>
    <Cell><Data ss:Type="String">c5</Data></Cell>
    <Cell><Data ss:Type="String">c6</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">abc</Data></Cell>
    <Cell><Data ss:Type="String">def</Data></Cell>
    <Cell><Data ss:Type="String">ghi</Data></Cell>
   </Row>
   <Row>
    <Cell><Data ss:Type="String">ase</Data></Cell>
    <Cell><Data ss:Type="String">dfg</Data></Cell>
    <Cell><Data ss:Type="String">tgy</Data></Cell>
   </Row>
  </Table>
...
 </Worksheet>
</Workbook>

As you can see first rows consist an information about column names.
Is it possible to convert that XML format through XSL to format like that:

<Worksheet Name="Sheet1">
<Row>
  <c1>1</c1>
  <c2>a</c2>
  <c3>11.06.2003</c3>
</Row>
  <c1>2</c1>
  <c2>b</c2>
  <c3>12.06.2003</c3>
<Row>
</Worksheet>
...

Thank you for your help!





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS