Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create a map in Excel for importing an XML file? (Using attributes for column values)

Status
Not open for further replies.

PPettit

IS-IT--Management
Sep 13, 2003
511
US
I'm trying to figure out how to create an Excel map for my PIDX XML documents. For each line item in the invoice, there are these two elements:
Code:
<pidx:ServiceDateTime dateTypeIndicator="ServicePeriodStart">2013-10-01T00:00:00</pidx:ServiceDateTime>
<pidx:ServiceDateTime dateTypeIndicator="ServicePeriodEnd">2013-11-01T00:00:00</pidx:ServiceDateTime>

If I drag and drop the ServiceDateTime element onto my spreadsheet, Excel displays the line items like this (note the duplicated lines):
Code:
LineItemNumber | (other details)... | ServiceDateTime     |
             1 | ...                | 2013-10-01T00:00:00 |
             1 | ...                | 2013-11-01T00:00:00 |
             2 | ...                | 2013-10-01T00:00:00 |
             2 | ...                | 2013-11-01T00:00:00 |


Is there a way to make Excel display them like this? (i.e. start and end dates on the same line):
Code:
LineItemNumber | (other details)...| ServiceDateTime(ServicePeriodStart) | ServiceDateTime(ServicePeriodEnd) |
             1 | ...               | 2013-10-01T00:00:00                 | 2013-11-01T00:00:00               |
             2 | ...               | 2013-10-01T00:00:00                 | 2013-11-01T00:00:00               |

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top