CSV to XML Converter
XML is a great exchange format supported by literally thousands of data management software and services. Now, what if you only have a bunch of CSV files? Surely, the data are there, just take them. But in the real world this means you have to manually export data from CSV to XML file by file. That’s just ridiculous! There has to be some other way!
And you know what? There is a simple and inexpensive utility to convert all of your CSV to XML files without hassle and troublesome manual operation. The tool is called Advanced CSV Converter. With it, you can run conversion from GUI or use command line execution and save hours! Indeed, you surely have other work to do than manual conversion, do you?
Convert CSV to XML format using Advanced CSV Converter
1. Run the program.
2. Select the CSV file to convert, or select a folder to batch-convert all file in that folder.
3. Specify the output XML file to put the converted data in.
After this step you should end up with this window:
4. Then, the program displays a preview – a brief presentation of what data are stored in the source CSV file. Like that:
5. Now you can adjust conversion. Advanced CSV Converter offers the following conversion options:
- Delimiter selection. Normally, the program automatically determines the CSV delimiter used in the file. But you can set it manually to comma, tab, semicolon or a custom character;
- "Sort by" – this option, if enabled, specifies the column to sort the records by. This is useful when you want to rearrange the data before exporting them to XML;
- "Skip duplicates" – this option allows you to avoid adding the same records (if there are any) to the final XML twice or more;
- "Header in first line" – enable this if the very first line of the CSV file holds headers of the columns. The program does its best to automatically determine this, however, so in many cases you don’t have to worry about headers;
- "Columns" – this button brings up the column order rearrangement dialog. There, you can change the order the columns go as well as disable exclude columns from exporting;
- "Filter" – the powerful filtering options available in Advanced CSV Converter allow you to convert from CSV to XML only the data that meet some pre-defined criteria. Such as: the value is greater than, less than, equal to, hits the range and so on. You can add multiple columns to the filter to create complex conditions: “SALARY > 4500 and EMPLOYMENT_DATE < 20/10/2014”;
CSV to XML conversion via command line
"c:\Program Files\CSV Converter\csvcnv.exe" file.csv outfile.xml [/FILTER | /COLUMNS | /SORTBY | /SRCSEP | /STARTFROM | /WFILTER | /RootTag | /RecordTag]
Simple CSV to XML conversion
"c:\Program Files\CSV Converter\csvcnv.exe" sample.csv sample.xml
Convert CSV to XML with columns selection
"c:\Program Files\CSV Converter\csvcnv.exe" sample.csv sample.xml /COLUMNS:NAME,STREET
Convert csv to xml with filter
"c:\Program Files\CSV Converter\csvcnv.exe" sample.csv out.xml /FILTER:myfilter.txt
Convert CSV to XML with sorting order
"c:\Program Files\CSV Converter\csvcnv.exe" sample.csv sample.xml /sortby:SUM
Convert CSV to XML with TAB as delimiter in source file
"c:\Program Files\CSV Converter\csvcnv.exe" sample.csv sample.xml /SRCSEPTAB
Convert CSV to XML with PIPE as delimiter in source file
"c:\Program Files\CSV Converter\csvcnv.exe" sample.csv sample.xml /SRCSEPPIPE
Convert CSV to XML from line 3
"c:\Program Files\CSV Converter\csvcnv.exe" sample.csv sample.xml /STARTFROM:3
CSV to XML batch conversion
"c:\Program Files\CSV Converter\csvcnv.exe" c:\base\*.csv c:\out /TOXML
Using Wide filter
"c:\Program Files\CSV Converter\csvcnv.exe" sample.csv out.xml /wfilter:NY
"c:\Program Files\CSV Converter\csvcnv.exe" sample.csv out.xml /roottag:myroot /recordtag:myrec
Updated Thu, 11 Feb 2021
Back to CSV Converter Home