Hello,
I am trying to convert xlsx workbooks to XML format. The original xlsx file has some columns containing dates. These are in this format: dd/mm/yyyy.
When I run the conversion using:
Workbook workbook = new Workbook();
workbook.LoadFromFile(filename);
workbook.SaveAsXml(newFilename);
The dates are no longer saved as dates, they are saved as numbers, below is a snippet from the XML: The row in red was a date in the xlsx document.
<Row ss:Height="12.75" ss:AutoFitHeight="0">
<Cell ss:StyleID="s49"><Data ss:Type="String">2</Data></Cell>
<Cell ss:StyleID="s49"><Data ss:Type="String">0</Data></Cell>
<Cell ss:StyleID="s49"><Data ss:Type="String">02</Data></Cell>
<Cell ss:StyleID="s49"><Data ss:Type="String">Test String</Data></Cell>
<Cell ss:Index="6" ss:StyleID="s51"><Data ss:Type="Number">43070</Data></Cell>
<Cell ss:Index="8"><Data ss:Type="String">Test data</Data></Cell>
<Cell ss:Index="10" ss:StyleID="s45"><Data ss:Type="String">0002</Data></Cell>
<Cell ss:StyleID="s45"><Data ss:Type="String">2</Data></Cell>
</Row>
If I 'SaveAs' xml spreadsheet in Excel, the same row appears as below.
<Row>
<Cell><Data ss:Type="String">2</Data></Cell>
<Cell><Data ss:Type="String">0</Data></Cell>
<Cell><Data ss:Type="String">02</Data></Cell>
<Cell><Data ss:Type="String">Test String</Data></Cell>
<Cell ss:Index="6" ss:StyleID="s65"><Data ss:Type="DateTime">2017-12-01T00:00:00.000</Data></Cell>
<Cell ss:Index="8"><Data ss:Type="String">Test data</Data></Cell>
<Cell ss:Index="10" ss:StyleID="s59"><Data ss:Type="String">0002</Data></Cell>
<Cell ss:StyleID="s59"><Data ss:Type="String">2</Data></Cell>
</Row>
Have you any idea why this may be please?