Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to export data from Excel to a valid Xml?

I have an Excel table with some data that I would like to export to an Xml file.
This exported Xml needs to be valid against an Xsd.

Note that all the formatting and validation must be done inside Excel because it'll be the only tool available to the person who will do the export.

Any recommendation to get this task done?

like image 702
systempuntoout Avatar asked Feb 28 '10 08:02

systempuntoout


People also ask

Can Xlsx be converted to XML?

How to convert a XLSX to a XML file? Choose the XLSX file that you want to convert. Select XML as the the format you want to convert your XLSX file to. Click "Convert" to convert your XLSX file.

Is an Excel File an XML File?

Excel has a defined XML schema that defines the contents of an Excel workbook, including XML tags that store all workbook information, such as data and properties, and define the overall structure of the workbook. Custom applications can use this Excel macro-enabled Office XML Format File.


2 Answers

Save your file in xml format from Excel. This is known as MS Office XML. Documentation (and schema) is available for both Office 2003 and 2007.

like image 99
AlexS Avatar answered Nov 01 '22 11:11

AlexS


I know it's a very old question but just in case some one else bumps in..

Accepted answer is good but XMLSS is far more complicated(though it's valid XML), I thought of sharing this resource on Microsoft. It explains everything step by step.

Another option is to create a CSV file and then convert it into XML using XI - There was an article about it on IBM developer works which can do the job quite well.

This Java API may also be of interest for few.

like image 45
Fr0zenFyr Avatar answered Nov 01 '22 11:11

Fr0zenFyr