+ Reply to Thread
Results 1 to 5 of 5

Looping through an XML to get info

  1. #1
    Registered User
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    28

    Looping through an XML to get info

    I am trying to create a macro to get info from an XML and parsing using MSXML2. As you can see from the attached pic of the XML below some of the childnodes have the same row number and I am trying to see what the best way is for me to go through the child nodes with the same row number and output that info to the same row line of the spreadsheet. For example I want everything that has row 2 to be on line 13 of the excel, then row 3 will be on line 14 since "i" will increase to 1..

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Looping through an XML to get info

    Do you mean like this

    Please Login or Register  to view this content.
    ?

  3. #3
    Registered User
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: Looping through an XML to get info

    The problem is not that, the problem is that there are more than one child nodes for a row. There is a tag for description on one of the child nodes for each row, so if the macro loops to the next node looking for a description and doesn't find anything it automatically gets the description from the next row which is wrong.

    By the way I tried pasting the XML info as below and replaced < and > with # since this forum won't allow HTML code format to be posted.

    Please Login or Register  to view this content.
    Last edited by dontke; 06-30-2016 at 04:34 PM.

  4. #4
    Registered User
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: Looping through an XML to get info

    Anyone who can help..highly appreciated. Thanks.

  5. #5
    Registered User
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: Looping through an XML to get info

    Reposting this again. Please help

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 02-10-2016, 11:26 AM
  2. need cell to populate info from anther sheep depending on info entered.
    By superchew in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2015, 09:03 PM
  3. [SOLVED] Cmd to Listbox (Find info in sheet2) copy/paste info to A7 Excel 2007
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-14-2013, 09:49 AM
  4. Looping a macro/vba to save info into new workbook.
    By jrherr1050 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-17-2012, 04:12 PM
  5. Search and find info, if correct info found copy into new worksheet
    By JnrParki in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-13-2011, 11:36 AM
  6. edit macro that is pasting info to check column for duplicate info
    By roth_nj in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-06-2009, 05:55 PM
  7. Make a sheet with selectable info, send email using info selected
    By DwayneHeight in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-17-2007, 12:18 PM

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