Pulling Data Out of HTML/XML Code

default_name

Board Regular
Joined
May 16, 2018
Messages
180
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
I have a bunch of data that was exported in an html/xml format.

<schoolFood1Type location="" size="0">63</schoolFood1Type>
<schoolFood1Order location="" size="0">198</schoolFood1Order>
<schoolFood1ProgramA location="" size="0">Yes</schoolFood1ProgramA>
<schoolFood1XPos location="" size="0">32</schoolFood1XPos>
<schoolFood1YPos location="" size="0">81</schoolFood1YPos>
<schoolFood1ZPos location="" size="0">91</schoolFood1ZPos>
<schoolFood2Type location="" size="0">30</schoolFood1Type>
<schoolFood2Order location="" size="0">19</schoolFood1Order>
<schoolFood2ProgramA location="" size="0">No</schoolFood1ProgramA>
<schoolFood2XPos location="" size="0">74</schoolFood1XPos>
<schoolFood2YPos location="" size="0">8</schoolFood1YPos>
<schoolFood2ZPos location="" size="0">48</schoolFood1ZPos>
.....


There are a ton more rows than this.
If I open up a blank sheet and just paste all of the xml/html code into it, luckily it DOES split the data up into individual rows (so that's a little bit helpful at least).
It is super tedious to try and pull this data manually into an excel table.
I am wondering if there is a more structured/automated approach.
The table is designed like this:
ABCDEFG
1TypeOrderProgramAXYZ
2Food163198Yes328191
3Food23019No74848
4...

Not sure if this is even possible in Excel.
VBA would be nice.
Non-VBA would also be nice.

Thanks in advance for your help!
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
At the risk of stating the obvious, have you tried File > Open > Change file type to all files, then open ?

Power Query would be another option if the above does not give you a decent result.
Date > Get Data > From File > From XML (change to all file types)
 
Upvote 0

Forum statistics

Threads
1,223,632
Messages
6,173,467
Members
452,516
Latest member
archcalx

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