Custom formatting XML data in Excel

TissuncAcisse

New Member
I have some data in XML format:\[code\]<CompanyList> <Company> <Id>1</Id> <Name>Name1</Name> </Company> <Company> <Id>2</Id> <Name>Name2</Name> <AddressList> <Address> <City>City1</City> <Street>Street1</Street> </Address> <Address> <City>City2</City> <Street>Street2</Street> </Address> </AddressList> </Company></CompanyList>\[/code\]Is it possible to format it in Excel in such a way, that the list of addresses is below the corresponding company and little indented? Something like this:
20i0Y.png
Moreover I would like to do this programmatically from VB.Net, but yet I don't manage to do this even directly in Excel (by means of the associated XML Map).One solution would be to write the xml for excel workbook:\[code\]<?xml version="1.0"?><Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"xmlns:o="urn:schemas-microsoft-com:office:office"xmlns:x="urn:schemas-microsoft-com:office:excel"xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"><Worksheet ss:Name="Data Export"> <Table> <Row> <Cell> <Data ss:Type="String">1</Data> </Cell> <Cell> <Data ss:Type="String">Name1</Data> </Cell> </Row> <Row> <Cell> <Data ss:Type="String">2</Data> </Cell> <Cell> <Data ss:Type="String">Name2</Data> </Cell> </Row> <Row> <Cell/> <Cell> <Data ss:Type="String">Address1</Data> </Cell> </Row> <Row> <Cell/> <Cell> <Data ss:Type="String">Address2</Data> </Cell> </Row> </Table></Worksheet></Workbook>\[/code\]but I get my data in the format I listed very first, so I must rewrite the XML and it is not the best option.Thank you for any hints.
 
Back
Top