cosmarchy
08-11-2010, 11:23 AM
Hi,
I have an excel file which I need to read into a recordset so that I can perform additional queries on it.
The xml file contains:
<Catalog>
<Rec>
<ITEM dt:dt="string">1903</ITEM>
<QTY dt:dt="string">15</QTY>
<SUB dt:dt="string">Widget 1</SUB>
</Rec>
<Rec>
<ITEM dt:dt="string"/>
<QTY dt:dt="string">10</QTY>
<SUB dt:dt="string">Widget 2</SUB>
</Rec>
<Rec>
<ITEM dt:dt="string">1551</ITEM>
<QTY dt:dt="string">5</QTY>
<SUB dt:dt="string">Widget 3</SUB>
</Rec>
<Catalog>
and i'd like to end up with a recordset, something like this:
Item | Qty | Sub
================
1903 | 15 | Widget 1
| 10 | Widget 2
1551 | 5 | Widget 3
which I can perform additional SQL queries on.
Something like "SELECT * FROM xmlFile" would be really nice but I suspect there has to be some code to read in the file?
Any help is appreciated.
Thanks
I have an excel file which I need to read into a recordset so that I can perform additional queries on it.
The xml file contains:
<Catalog>
<Rec>
<ITEM dt:dt="string">1903</ITEM>
<QTY dt:dt="string">15</QTY>
<SUB dt:dt="string">Widget 1</SUB>
</Rec>
<Rec>
<ITEM dt:dt="string"/>
<QTY dt:dt="string">10</QTY>
<SUB dt:dt="string">Widget 2</SUB>
</Rec>
<Rec>
<ITEM dt:dt="string">1551</ITEM>
<QTY dt:dt="string">5</QTY>
<SUB dt:dt="string">Widget 3</SUB>
</Rec>
<Catalog>
and i'd like to end up with a recordset, something like this:
Item | Qty | Sub
================
1903 | 15 | Widget 1
| 10 | Widget 2
1551 | 5 | Widget 3
which I can perform additional SQL queries on.
Something like "SELECT * FROM xmlFile" would be really nice but I suspect there has to be some code to read in the file?
Any help is appreciated.
Thanks