I wonder if there is an easy way to read Excel 2010 XML?
This XML has a different structure than I used to read.
Especially ss:index attribute (ss:Index**=”7″) makes things a bit more complicated
EDIT:
To explain better:
- I have file with XML extension which can be easily opened in Excel
- I’m looking a way to read this sheet programically (eg copy to DataTable)
- Noticed this is not common XML I used to work
- XML defines fields on the begining, than use ROW, CELL and DATA tags
- What surprised me is when there are eg 3 fields (cells) but 2nd field doesn’t have value this field is ‘skipped’ in XML, but 3rd field has some additional ‘index’ attribute eg: ss:Index**=”3″ (which indicates that even it is on 2nd position right index should be “3”
fragment of example XML
<Row ss:AutoFitHeight="0">
<Cell><Data ss:Type="String">Johny</Data></Cell>
<Cell ss:Index="3"><Data ss:Type="String">NY</Data></Cell>
OK I’ve finally found solution from here: http://www.codeproject.com/Articles/32370/Import-Excel-File-to-DataSet#xx
Below sample code little adopted to my needs.