Sunday, 21 July 2019

.CSV -> TPIPE -> .XML

When I open a .CSV file with Microsoft Excel 2007, I am presented with the data in spreadsheet format;



However, if I convert the .CSV file to .XML using TPIPE, I get a spreadsheet with built-in query options;



Here's what I do.

I will be using a simple filter type, which will convert CSV (with column headers) to XML.

While it is not necessary, I create an environment variable to make the filter more readable;



Code:
set csv2xml=/simple=54

echo %csv2xml

Next, I enter the following command from TCC;



Code:
tpipe /input=LdnOnt_1891.csv %csv2xml /output=LdnOnt_1891.xml

I now open the .XML file with Microsoft Excel 2007;



Code:
excel LdnOnt_1891.xml


I am presented with a dialog box;




...and click OK to accept the default.

This presents another dialog box;



...from which I click OK to accept the default.

While it's the same data, the conversion to .XML makes working with the data easier for me in Excel.

Joe

No comments:

Post a Comment