When doing the project, XML is used for WEBSERIVCE data transmission, when the amount is large, it is troublesome to analyze the obtained data, after importing to Excel, the data can be processed conveniently.
The following is the basic format:
<?xml version= "1.0" encoding= "UTF-8"?>
<soap:envelope xmlns:soap= "http://schemas.xmlsoap.org/soap/envelope/" >
</SOAP:Envelope>
Let me give you an example. We use direct import to try.
First, download the test document.
3.xml:http://download.csdn.net/detail/leejianxue/9066343
<?xml version= "1.0" encoding= "UTF-8"?>
<soap:envelope xmlns:soap= "http://schemas.xmlsoap.org/soap/envelope/" >
<NewDataSet> <Table1> <Lgnum>33</Lgnum> <Tbnum>33</Tbnum> <tbpos>0000 </Tbpos> <Matnr>33</Matnr> <Werks>33</Werks> <Charg>33333333</Charg> <Lgort>0012</Lgort> <Menga>2.000</Menga> <Altme>GE</Altme> <Maktx> Replacement </Maktx> <Vltyp>922</Vltyp> <Vlpla>333</Vlpla> <Bwlvs>309</Bwlvs> < trart></trart> <Nltyp></Nltyp> <Nlpla></Nlpla> <mblnr>3333333</mblnr > <Mjahr>3333</Mjahr> <NewLgtyp>333</NewLgtyp> <batch></batch> <ts_lgpla ></ts_lgpla> </Table1><Table1> <Lgnum>33</Lgnum> <Tbnum>33</Tbnum> <Tbpos>0000</Tbpos> <Matnr>33</Matnr> <Werks>33</Werks> <charg>33333333 </Charg> <Lgort>0012</Lgort> <Menga>2.000</Menga> <ALTME>GE</ALTME> <Maktx> replacement </Maktx> <Vltyp>922</Vltyp> <Vlpla>333</Vlpla> <bwlvs>309</ bwlvs> <Trart></Trart> <Nltyp></Nltyp> <Nlpla></Nlpla> <mblnr>3333333 </Mblnr> <Mjahr>3333</Mjahr> <NewLgtyp>333</NewLgtyp> <batch></batch> <ts_lgpla></ts_lgpla> </Table1> </NewDataSet>
</SOAP:Envelope>
Data used in Excel = "Other data sources" + from XML data source import. Select 3.xml. Prompt for the following, OK.
Third, the result, the data is more than 1 when the data format, that is, the table header. If there is only one record, it appears that only the data is displayed and there is no header field.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Basic framework for importing from XML to Excel