XML export missing header row when imported into Excel

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
We are currently exporting an XML file for our clients who then import the file into Excel.
Our problem is that the file ether
A) Displays the data from the same record across multiple rows when it should display on the same row
B) Displays the data from the same record on the same row but without the column header

Below is a sample of the XML we output. All suggestions are welcomed!
<pre class="prettyprint <?xml version="1.0"encoding="UTF-8"?> <Export> <Record>
<Header> <QuestionId><![CDATA[7458295]]></QuestionId> <DateEntered><![CDATA[18:00:21 2012/02/20 (GMT -0500)]]></DateEntered> <PatronInstitution> <InstitutionName><![CDATA[CAPRICA LIBR]]></InstitutionName>
<AgentName><![CDATA[CAPRICA Admin]]></AgentName>
<Status><![CDATA[Answered]]></Status> </PatronInstitution>
<Type><![CDATA[Chat Sessions]]></Type> <WaitTime><![CDATA[10]]></WaitTime> <SessionTime><![CDATA[874]]></SessionTime> <Language><![CDATA[4]]></Language> <QuestionFormField> <ID><![CDATA[12]]></ID> <Label><![CDATA[Referer]]></Label> <Data><![CDATA[http://URL]]></Data> </QuestionFormField> <QuestionFormField> <ID><![CDATA[13]]></ID> <Label><![CDATA[Browser/OS]]></Label> <Data><![CDATA[Mozilla/5.0 (compatible; MSIE9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; SAMSUNG;
SGH-i917)]]></Data> </QuestionFormField>
<QuestionFormField> <ID><![CDATA[14]]></ID>
<Label><![CDATA[Cobrowse]]></Label>

<Data><![CDATA[No]]></Data> </QuestionFormField> </Header> </Record> <Record> <Header> <QuestionId><![CDATA[7458287]]></QuestionId> <DateEntered><![CDATA[17:57:31 2012/02/20 (GMT
-0500)]]></DateEntered> <PatronInstitution> <InstitutionName><![CDATA[CAPRICALIBR]]> </InstitutionName> <AgentName><![CDATA[CAPRICAAdmin]]></AgentName>
<Status><![CDATA[Answered]]></Status> </PatronInstitution> <Type><![CDATA[Chat Sessions]]></Type> <WaitTime><![CDATA[10]]></WaitTime> <SessionTime><![CDATA[150]]></SessionTime> <Language><![CDATA[4]]></Language> <QuestionFormField> <ID><![CDATA[12]]></ID> <Label><![CDATA[Referer]]></Label> <Data><![CDATA[http://URL]]></Data> </QuestionFormField> <QuestionFormField> <ID><![CDATA[13]]></ID> <Label><![CDATA[Browser/OS]]></Label> <Data><![CDATA[Mozilla/5.0 (compatible; MSIE
9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; SAMSUNG;
SGH-i917)]]></Data> </QuestionFormField>
<QuestionFormField> <ID><![CDATA[14]]></ID> <Label><![CDATA[Cobrowse]]></Label> <Data><![CDATA[No]]></Data> </QuestionFormField> </Header> </Record> </Export> <br/> [/code]
<span style="white-space:pre
<span style="white-space:pre Thanks
<span style="white-space:pre David<br/>



View the full article
 
Back
Top