How do I properly pivot duplicate data to avoid enumeration errors? (Importing XML)

Hodaeg

New Member
Joined
Oct 28, 2019
Messages
1
[FONT=&quot]Hi![/FONT]
[FONT=&quot]I have a custom google map with thousands of pins and thousands upon thousands of data points in an XML file. I'm trying to get them to display all nicely in a normal spreadsheet so I can sort and analyze the data. I'm having trouble with the final steps when I'm importing the XML file into Excel, though. Full disclosure: I am not very well versed in excel or VB, and I wasn't even going to do this myself but the service I was going to use, Mygeodata, told me to pound sand.

I'll explain what happened below using 1, 2, 3, and 4 as references in this screenshot: https://imgur.com/a/KP4QDWh

Much of my data is still nested in Tables within the columns after pivoting the table (
step 1 and 2 in the screenshot), so I need to "Expand" all the data as I did when I first uploaded my file (or so I assume, at least). This gives me the data I want. (Step 3 in the screenshot)

Except now, after I expand all the columns I get the following error: "Expression Error: There were too many elements in the enumeration." (Step 4 in the screenshot) The error does not pop up before I expand the remaining columns. Upon googling, I seem to have found my issue (duplicate columns after I pivot the table) and solution (use an index column).

Here's my problem: I'm not sure exactly what an index column is, and I'm not sure how to use the code that I have found posted for the advanced editor in the above link. In addition, I had about 7 or 8 columns that I needed to expand further after pivoting. Does that mean I need an index column for every column that I expand?

I have a feeling I'm pretty close! So if any of you kind souls can help me, that would be absolutely wonderful.

Much thanks![/FONT]
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,214,593
Messages
6,120,434
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top