xml import in Excel grouping repeating elements by value

G

Gyldor

Hi there,

I'm new to this group, so please notify me when this post belongs in
another group...
I'm struggeling for a while now with xml import into Excel 2007 and
mapping the XMLSource to the worksheet. Not so much the import but
what you do with the representation of xml in a worksheet.

The XML (most simplified version of course)
<?xml version="1.0" encoding="UTF-8" ?>
<root>
<elem id='1' type='T1' attr1='a' />
<elem id='2' type='T1' attr1='b' />
<elem id='3' type='T1' attr1='c' />
<elem id='4' type='T1' attr1='d' />
<elem id='5' type='T2' attr1='e' />
<elem id='6' type='T3' attr1='f' />
<elem id='7' type='T2' attr1='g' />
<elem id='8' type='T2' attr1='h' />
<elem id='9' type='T3' attr1='i' />
<elem id='10' type='T1' attr1='j' />
</root>

The goal:

in Excel I'd like to map the elements to different secions in the
worksheet using the value specified in the attribute 'type' like "elem
[@type='T1']". Somewhere else in the worksheet "elem[@type='T2']" etc.

The worksheet I'm creating should be used as a template by a program
which generates the xml and distributed to end-users. Preferably this
should be a solution without the use of VBA due to company policy.

Any idea how to achieve this?

regards,

Sander
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top