naygl
04-20-2011, 08:48 PM
I have an xml file:
<Summary>
<JobNumber>111112</JobNumber>
<ClientCode>Client01</ClientCode>
<StartDate>Thursday, 21 April 2011</StartDate>
<StartTime>11:36:35</StartTime>
<SpoolList>
<SpoolFile>
<InputData>filename1.txt</InputData>
<Mailsets>7160</Mailsets>
<MailsetSheets>7160</MailsetSheets>
<MailsetImpressions>14320</MailsetImpressions>
<Tray1>0</Tray1>
<Tray2>0</Tray2>
<Tray3>0</Tray3>
<Tray4>0</Tray4>
<Tray5>0</Tray5>
<Tray6>0</Tray6>
<FirstMailset>Nathan and Rachel Paki</FirstMailset>
<LastMailset>Norman William Jack</LastMailset>
</SpoolFile>
<SpoolFile>
<InputData>filename2.txt</InputData>
<Mailsets>7160</Mailsets>
<MailsetSheets>7160</MailsetSheets>
<MailsetImpressions>14320</MailsetImpressions>
<Tray1>0</Tray1>
<Tray2>0</Tray2>
<Tray3>0</Tray3>
<Tray4>0</Tray4>
<Tray5>0</Tray5>
<Tray6>0</Tray6>
<FirstMailset>John and Jamie</FirstMailset>
<LastMailset>Tilman</LastMailset>
</SpoolFile>
</SpoolList>
<TotalSpoolFiles>2</TotalSpoolFiles>
</Summary>
...and I need to import the xml, create a sheet for each spool file using VBA and diplay the data. The sheets will be in the same format (currently one sheet is manually filled out and printed per spoolfile) so, for example, the InputData element will be in C11 and the Mailsets element will be in L14.
Any help would be greatly appreciated as I have not had much experience with xmlMaps etc. in VBA.
Cheers.
<Summary>
<JobNumber>111112</JobNumber>
<ClientCode>Client01</ClientCode>
<StartDate>Thursday, 21 April 2011</StartDate>
<StartTime>11:36:35</StartTime>
<SpoolList>
<SpoolFile>
<InputData>filename1.txt</InputData>
<Mailsets>7160</Mailsets>
<MailsetSheets>7160</MailsetSheets>
<MailsetImpressions>14320</MailsetImpressions>
<Tray1>0</Tray1>
<Tray2>0</Tray2>
<Tray3>0</Tray3>
<Tray4>0</Tray4>
<Tray5>0</Tray5>
<Tray6>0</Tray6>
<FirstMailset>Nathan and Rachel Paki</FirstMailset>
<LastMailset>Norman William Jack</LastMailset>
</SpoolFile>
<SpoolFile>
<InputData>filename2.txt</InputData>
<Mailsets>7160</Mailsets>
<MailsetSheets>7160</MailsetSheets>
<MailsetImpressions>14320</MailsetImpressions>
<Tray1>0</Tray1>
<Tray2>0</Tray2>
<Tray3>0</Tray3>
<Tray4>0</Tray4>
<Tray5>0</Tray5>
<Tray6>0</Tray6>
<FirstMailset>John and Jamie</FirstMailset>
<LastMailset>Tilman</LastMailset>
</SpoolFile>
</SpoolList>
<TotalSpoolFiles>2</TotalSpoolFiles>
</Summary>
...and I need to import the xml, create a sheet for each spool file using VBA and diplay the data. The sheets will be in the same format (currently one sheet is manually filled out and printed per spoolfile) so, for example, the InputData element will be in C11 and the Mailsets element will be in L14.
Any help would be greatly appreciated as I have not had much experience with xmlMaps etc. in VBA.
Cheers.