Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read Excel file to XML

Status
Not open for further replies.

thakral

Technical User
Sep 6, 2002
16
TH
Hi

Was wondering if it is possible to create a XML file by reading its contents from an Excel file.

e.g.
<root>
<node1>Cell A7</node>
<node2>Cell A8</node>
<node3>Cell A9</node>
<node4>Cell A10</node>
<node5>Cell A11</node>
</root>

something similar to that ?
Any ideas ..
Thanks
anant
 
First, have a look at:
(section "creating xml documents")
The article refers to excel 2003.

For older versions, you could do it programmaticly, for example in VB or VBA.
XML is 'just' plain text, so if you write a structure that loops through all rows and cells, you can easily generate xml.
One warning: string-concatenation in VB and VBA gets slower the longer the string gets. Therefore you should either write each node dirctly to file, or not concatenate at all and use MSXMLDom (add a node for each cell, etc).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top