Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How do you easily convert an excel file into a XML file?

When trying to save as an XML File, it complains that the file does not have an XML mapping. Clicking help brings up pretty complicated stuff about XML Mapping file, XLD and some other acronyms. Why is it so complicated?

Lately I've realized that tab delimited, CSV and others are prone to formating issues (comas in a field, new lines, quotes, ...). So I think that XML is a better way to process excel data.

Please advise. Maybe a freeway tool?

share|improve this question
Tab delimited avoids the issue of commas in fields as they are not part of the delimiter. If you save CSV files using Excel and it detects commas in some fields it will wrap them in quotes to avoid ambiguity, but the system you are inputting into needs to understand this and strip them. –  AdamV Mar 25 '10 at 11:08

5 Answers 5

Here is an oldish reference to the 'XML::Excel' Perl module.
There is another question on Stackoverflow that shows samples for converting to CSV that may give you ideas on using such scripts.

There is also a short IBM developerWorks article on tips to Convert Excel data to XML which points to some resources.

share|improve this answer
The link to IBM developerWorks is broken, sadly... do you know of an updated link? –  Nathan Fellman Jul 7 '13 at 19:56
I took the liberty of fixing the link. –  Nathan Fellman Jul 7 '13 at 20:07

here is the perl code to convert CSV file into XML file

use XML::CSV;
$csv_obj = XML::CSV->new();

 $csv_obj->parse_doc("customer.csv", {headings => 1});


more details you can find in Convert CSV file into XML file in Perl

share|improve this answer

In Excel 2007, by default spreadsheets are saved into a complicated XML format(xlsx) which then gets zipped up into a single file. If you want to save to a custom XML format you have to define a schema which defines how the data will be formed. There is no just "save to XML" option.

share|improve this answer
up vote 0 down vote accepted

How about that:

share|improve this answer
Link is broken :-( –  rjdkolb Feb 4 at 12:53

Excel has an XML tool add in for converting from spreadsheet to XML:

share|improve this answer
Same link as the accepted answer (only for another Office version) –  nixda Jun 5 '14 at 19:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.