public final class CSVTabToComma
extends java.lang.Object
Constructor and Description |
---|
CSVTabToComma(java.io.File file,
char separatorChar,
char quoteChar,
char commentChar,
java.lang.String encoding)
covert a tab-delimited to comma-delimited CSV file, constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Simple command line interface to CSVTabToComma, Converts tabs to commas is csv file whose name is on the command line.
|
public CSVTabToComma(java.io.File file, char separatorChar, char quoteChar, char commentChar, java.lang.String encoding) throws java.io.IOException
file
- CSV file to be packed to remove excess space and quotes.separatorChar
- field separator character, usually ',' in North America, ';' in Europe and sometimes '\t' for
tab for the output file. It is tab for the input file.
Note this is a 'char' not a "string".quoteChar
- character used to quote fields containing awkward chars.commentChar
- char to use to introduce comments. Use (char) 0 if none. Only one character allowed.
Note this is a 'char' not a "string". For output file. No comment presumed in input file.encoding
- encoding of input and output.java.io.IOException
- if problems reading/writing filepublic static void main(java.lang.String[] args)
args
- name of csv file to remove excess quotes and space