VirtualObjectives

Text Tools

Text Tools is a set of eight command-line utilities which allow the conversion of column delimited, tab delimited, CSV (comma separated values) as well as HTML tables and XML. The utilities can also be invoked via a GUI interface.

The following diagram illustrates the conversion paths possible with one or more combinations of utilities. Most of the tools are CSV centric as this is the most readily available format.

Col2Tab Col2Csv Html2Csv & Csv2Html Csv2Tab & Tab2Csv Csv2Xml & Xml2Csv

Program

Function

Col2Csv Column delimited to CSV delimited file conversion.
Col2Tab Column delimited to Tab delimited file conversion.
Csv2Tab CSV delimited to Tab delimited file conversion.
Tab2Csv Tab delimited to CSV delimited file conversion.
Csv2Html CSV delimited to HTML table file conversion.
Html2Csv HTML table to CSV delimited file conversion.
Csv2Xml CSV delimited to XML file conversion.
Xml2Csv XML file to CSV delimited file conversion.

Download Text Tools Version 3.0 (Size 2,347 KiB) Shareware 30 day trial.
SHA256 Hash = 3d89320df6c3b4765ceab50371caef8b2cb2df119e42bd6e3fcaaecac1a57feb
SSL Certificates
Buy all 8 tools together for AUD $15
via PayPal account or Credit Card
Quantity:
Buy all 8 tools together for AUD $15
via Stripe using Credit Card

Top

Features:

  • Support for Windows 7 and Windows Vista.
  • GUI interface.
  • HTML help file.
  • Input/source files are tested for validity before conversion.
  • Failed conversions now remove partially created output files.
  • UNC support.
  • Environment variable support.
  • Installation path is added to the system environment variable PATH.

Top

Command-Line and GUI Interfaces:

You can use Text Tools via a command-line...

Text Tools Command-Line Interface

You can also use Text Tools using a GUI Interface...

Text Tools GUI Interface

Top

Col2Csv:

Column delimited to CSV delimited file conversion tool.

Usage: Col2Csv <input file> <output file> <column nums>
               [/Delimiter <x>] [/QuoteChar <x>] [/I]

       <input file>   Column delimited source file.
       <output file>  Destination file.
       <column nums>  List of comma separated numbers indicating starting
                      positions for each column of data. No spaces allowed.
       /Delimiter <x> Delimiter used to separate data columns (Default ,)
       /QuoteChar <x> Character used to enclose strings (Default ")
       /I             Ignore the first line (header) in the input file.

eg. 1 Col2Csv input.txt output.csv 5,17,45,55
eg. 2 Col2Csv "source file.txt" "c:\temp\output.csv" 7,19,21,49 /Delimiter "|"

Top

Col2Tab:

Column delimited to Tab delimited file conversion tool.

Usage: Col2Tab <input file> <output file> <column nums> [/I]

       <input file>  Column delimited source file.
       <output file> Destination file.
       <column nums> List of comma separated numbers indicating starting
                     positions for each column of data. No spaces allowed.
       /I            Ignore the first line (header) in the input file.

eg. 1 Col2Tab input.txt output.txt 5,17,45,55
eg. 2 Col2Tab "source file.txt" "c:\temp\output.tab" 7,19,21,49,73

Top

Csv2Tab:

CSV delimited to Tab delimited file conversion tool.

Usage: Csv2Tab <input file> <output file> [/Delimiter <x>] [/QuoteChar <x>] [/I]

  <input file>    CSV input file.
  <output file>   Tab delimited output file.
  /Delimiter <x>  Delimiter used to separate data cols in CSV file. (Default ,)
  /QuoteChar <x>  Character used to enclose strings in CSV file. (Default ")
  /I              Ignore the first line (header) in the input file.

eg. 2 Csv2Tab "c:\temp\input file.csv" output.txt
eg. 3 Csv2Tab input.csv output.txt /Delimiter "|"

Top

Tab2Csv:

Tab delimited to CSV delimited file conversion tool.

Usage: Tab2Csv <input file> <output file> [/Delimiter <x>] [/QuoteChar <x>] [/I]

       <input file>   Tab delimited source file.
       <output file>  CSV delimited destination file.
       /Delimiter <x> Delimiter used to separate data columns (Default ,)
       /QuoteChar <x> Character used to enclose strings (Default ")
       /I             Ignore the first line (header) in the input file.

eg. 1 Tab2Csv input.txt output.csv
eg. 2 Tab2Csv "c:\temp\source file.txt" output.csv
eg. 3 Tab2Csv input.txt output.csv /Delimiter "|"

Top

Csv2Html:

CSV delimited to HTML table file conversion tool.
Creates a HTML file made up of a table based upon the contents of a CSV file.

Usage: Csv2Html <input file> <output file> [/F <format file>] [/Delimiter <x>] [/QuoteChar <x>] [/I]

  <input file>     CSV input file.
  <output file>    HTML output file.
  /F <format file> Optional INI file used to format the table. Allows you to
                   specify meta tag and cascading style sheet which gives you
                   greater control over the table display properties.
  /Delimiter <x>   Delimiter used to separate data columns. (Default ,)
  /QuoteChar <x>   Character used to enclose strings (Default ")
  /I               Ignore the first line (header) in the input file.

eg. 1 Csv2Html input.csv output.htm
eg. 2 Csv2Html input.csv output.htm /F Csv2Html.ini /QuoteChar '
eg. 3 Csv2Html "c:\temp\source file.csv" output.htm /F Csv2Html.ini

Default format files are created when you first run Csv2Html.exe
These files are Csv2Html.ini and Csv2Html.css which give you greater control over the table display properties. Use of these files is optional.

Csv2Html.ini Format File:
This file allows you to turn on or off certain properties of the HTML file:

UseTitle   = Use title defined below. (0=No, 1=Yes, Default=1)
Title      = Title of output HTML file.
UseMetaTag = Use META tag defined below. (0=No, 1=Yes, Default=1)
MetaTag    = META tag (See http://www.w3.org/TR/html401/struct/global.html)
UseCascadingStyleSheet = Use CSS file defined below. (0=No, 1=Yes, Default=1)
CascadingStyleSheetFile = File name of CSS file. (Default Csv2Html.css)
CopyRenameCSSFile = Copy the CSS file to the same location as the HTML file
and rename the CSS file to have the same name as the HTML file.
(0=No, 1=Yes, Default=0) Ignored if CSS & HTML files are in the same path.

Csv2Html.css Cascading Style Sheet File:
This file defines how the table is formatted. It controls font type colour and size as well as background colour.
You can do a whole lot more. For more info see http://www.w3.org/Style/CSS/

Top

Html2Csv:

HTML table to CSV delimited file conversion tool.
Only one table per HTML file allowed.
All cells must be specified, ie. empty cells must be bounded by <td></td> tags.

Usage: Html2Csv <input file> <output file> [/Delimiter <x>] [/QuoteChar <x>] [/I]

  <input file>     HTML input file.
  <output file>    CSV output file.
  /Delimiter <x>   Delimiter used to separate data columns. (Default ,)
  /QuoteChar <x>   Character used to enclose strings (Default ")
  /I               Ignore the first table row (header) in the input file.
  /V               Ignore HTML validation. May result in incorrect conversion.

eg. 1 Html2Csv input.htm output.csv
eg. 2 Html2Csv "c:\temp\source file.htm output.csv
eg. 3 Html2Csv "c:\temp\source file.htm output.csv /Delimiter "|"

Top

Csv2Xml:

CSV delimited to XML file conversion tool.
Creates an XML file based upon the contents of a CSV file.

Usage: Csv2Xml <input file> <output file> [/CSS <css file>] [/Delimiter <x>] [/QuoteChar <x>] [/I]

  <input file>    CSV input file.
  <output file>   XML output file.
  /CSS <css file> Optional reference to a cascading style sheet file.
                  The file may be .CSS or .XSL types.
  /Delimiter <x>  Delimiter used to separate data cols in CSV file (Default ,)
  /QuoteChar <x>  Character used to enclose strings in CSV file (Default ")
  /I              Ignore the first line (header) in the input file.

eg. 1 Csv2Xml input.csv output.xml
eg. 2 Csv2Xml input.csv output.xml /CSS Csv2Xml.xsl
eg. 3 Csv2Xml "c:\temp\source file.csv" output.xml /Delimiter "|"

Top

Xml2Csv:

XML file to CSV delimited file conversion tool.
XML file must be standard format which must include all nodes in each row.

Usage: Xml2Csv <input file> <output file> <root element> [/Delimiter <x>] [/QuoteChar <x>]

<input file>   XML input file.
<output file>  Comma delimited output file.
<root element> The name of the node which indicates the start of the table.
/Delimiter <x> Delimiter used to separate data columns. (Default ,)
/QuoteChar <x> Character used to enclose strings (Default ")

eg. 1 Xml2Csv input.xml output.csv table
eg. 2 Xml2Csv "c:\temp\source file.xml" output.csv table
eg. 3 Xml2Csv input.xml output.csv table /Delimiter "|"

Top

Return Codes:

All the above programs return a code indicating whether the conversion has passed or failed.

  • 0 = Success
  • 1 = Failure

The following batch file is an example of how to use return codes:

The following batch file will convert multiple files at one time.
Obviously, the source files will need to be the same format and require the same conversion parameters.

Change History:

Expand/Collapse