public final class CSVToTable
extends java.lang.Object
Constructor and Description |
---|
CSVToTable(java.io.File file,
char separatorChar,
char quoteChar,
java.lang.String commentChars,
java.lang.String encoding,
java.lang.String... cssClasses)
Constructor to convert a CSV file to an HTML table.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Simple command line interface to CSVToTable.
|
public CSVToTable(java.io.File file, char separatorChar, char quoteChar, java.lang.String commentChars, java.lang.String encoding, java.lang.String... cssClasses) 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.commentChars
- characters to treat as comments.encoding
- encoding of the input and output file.cssClasses
- css Classes for columns of HTML table (optional)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