How do I process a worksheet in VBA imported from XML file

Copper Contributor

Hello,

 

I'm using Excel 2016.

 

I have a worksheet created form an imported XML file using Data\Get Data\From File\From XML and it has an associated .XSD file.  It has about 1,300 rows of product data.

 

One of the columns on the worksheet has a table format.  When I use the Query Editor to expand that column, it creates new columns with the expected data.

 

The problem with that is, it creates eight additional rows for each product.  One for each of the newly created data column entries.

 

I want to process the worksheet with VBA code and process each product creating a new worksheet with one row for each product.

 

Does anyone have any idea of how I should process the worksheet?

 

It seems like I should put the code in a loop for each product to get the column data for the expanded columns.

 

I will do that unless someone has another way to do it without creating all those extra rows.

 

I would appreciate any help that anyone can provide.

 

Thanks,
Tony

0 Replies