+ Reply to Thread
Results 1 to 4 of 4

Transfer data from XML DOM Document to spreadsheet

  1. #1
    Registered User
    Join Date
    04-04-2011
    Location
    Riga
    MS-Off Ver
    Excel 2007
    Posts
    11

    Transfer data from XML DOM Document to spreadsheet

    Hello,
    I reached the place where I read in *.xml from the web as DOM document to access nodes and manipulate them, but I can't seem to find a way to get values from DOM document to spreadsheet. I used real link, so nodes can bee looked up there. I'd like to paste all "price" nodes in my spreadsheet "Sheet1", cells(1,1). Here is the code:

    Please Login or Register  to view this content.
    Last edited by skazis; 04-06-2011 at 06:58 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: Transfer data from XML DOM Document to spreadsheet

    Quote Originally Posted by skazis View Post
    I'd like to paste all "price" nodes in my spreadsheet "Sheet1", cells(1,1).
    Within the For Next loop put:

    Sheets("Sheet1").Cells(1, 1).Value = Sheets("Sheet1").Cells(1, 1).Value & " " & oXmlNode.Text

  3. #3
    Registered User
    Join Date
    04-04-2011
    Location
    Riga
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Transfer data from XML DOM Document to spreadsheet

    That did the trick. Thank you. And could you please tell how to put these values each in a new cell? I tried FOR loop and variable within Cells(i,1), but for each i loop cycled trough nodes and at the end put the last value and I ended up with all cells equal to last value of nodes.

  4. #4
    Registered User
    Join Date
    04-04-2011
    Location
    Riga
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Transfer data from XML DOM Document to spreadsheet

    I am getting better, did it on my own.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1