Working XML Files

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
72,494
Office Version
  1. 365
Platform
  1. Windows
We have a SQL database that we had a third-party vendor write an XML data extract application so we can use it to merge and print participant statements. The problem is, we need a way to count how many statements each company had printed for them (participant name and company name are on every statement).

In the XML file, each "block of data" lists the company name exactly once. So I was hoping to be able to work off this field (identify & count). The data has a structure something like this (where ... denotes lots of other data records between these rows, and the number of those rows can vary):
Code:
...
<CompanyName>ABC Corp.</CompanyName>
...
<CompanyName>ABC Corp.</CompanyName>
...
<CompanyName>ABC Corp.</CompanyName>
...
<CompanyName>ACME Inc.</CompanyName>
...
<CompanyName>XYZ, LLP</CompanyName>
...
<CompanyName>XYZ, LLP</CompanyName>
...
So the results I am looking for would be something like:
Code:
Company Name     Count
ABC Corp.           3
ACME Inc.           1
XYZ, LLP            2
The easiest way would be open it up in Excel or Access and filter out all but the rows I need and do counts on them, but the problem is these data files are probably going to have a couple million rows in them. So that rules Excel out, and it remains to be seen whether Access can handle that much data with its 2 Gig memory limit.

So, does anyone know of any other methods to do something like this, or any Mr. Excel type forums that handle issues like this?

Thanks.
 
Cool! how long does it take now? and what are you going to do with that extra time now? assuming your Boss still thinks it's going to take you hours to do this.
 
Upvote 0

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
I think it only took about 10-15 minutes to run total, as opposed to an hour to load, and then who knows how long to open the query (I got tired of waiting and gave up).

Unfortunately, the extra time is already spent. I have about 10 other projects waiting for me! But we saved the company money by not having to pay an outside firm to do it.
 
Upvote 0

Forum statistics

Threads
1,216,747
Messages
6,132,488
Members
449,729
Latest member
davelevnt

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