Java classes you can use standalone or embed in your own programs to
Read, write, align, sort
and pack comma, tab and semicolon-
separated variable files, commonly known as
CSV files.
It consists of a 23
Java classes/utilities CSVReader, CSVWriter, CSVAlign, CSVChangeCase, CSVCondense, CSVDeDup, CSVDeDupField, CSVDeEntify, CSVDump, CSVEntify, CSVPack, CSVPatch, CSVReshape, CSVSort, CSVSortField, CSVTabToComma, CSVTemplate, CSVToHTML, CSVToSRS,
CSVToTable, CSVTuple, LinesToCSV,
TableToCSV for reading and writing
CSV (Comma
Separated Value) formatted files.
Also handles tab-separated and semicolon-separated files. This is the format use by Microsoft Word and other Microsoft products. This version now supports # embedded comments.
You can configure the separator, quote and comment characters.
Note that
CSV files are perhaps 10 times slower to process than binary files. They are for data interchange with other languages or when human-readibility or editability is important.
If you want speed, use binary format files, e.g.
DataInputStream or possibly the convenient but slower ObjectInputStream.
For example, CSVAlign aligns the fields in columns for easier proofreading.
java com.mindprod.csv.CSVAlign somefile.csv
CSVPack removes all unecessary spaces to make at
CSV file as compact as possible.
java com.mindprod.csv.CSVPack somefile.csv
CSVSort sorts
CSV file case sensitively, insensitively or numerically on a set of columns, ascending or descending
CSVTabToComma converts a tab-separated file to a comma-separated one.
java com.mindprod.csv.CSVTabToComma somefile.csv
To link back to this page, please copy the code below and insert into your page and save the image button on your server.