public final class CSVTemplate
extends java.lang.Object
Constructor and Description |
---|
CSVTemplate(java.io.File readFile,
java.io.File writeFile,
java.lang.String template,
char separatorChar,
char quoteChar,
java.lang.String commentChars,
java.lang.String encoding)
Constructor to Expand a CSV file to boilerplate in a text file.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Simple command line interface to CSVToTable.
|
public CSVTemplate(java.io.File readFile, java.io.File writeFile, java.lang.String template, char separatorChar, char quoteChar, java.lang.String commentChars, java.lang.String encoding) throws java.io.IOException
readFile
- CSV file containing data to insert into the template.writeFile
- Where the expanded templates are written.template
- The string include %n to select 0-based cols, possibly multiline.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.java.io.IOException
- if problems reading/writing filepublic static void main(java.lang.String[] args) throws java.io.IOException
args
- name of csv file to remove excess quotes and spacejava.io.IOException
- if trouble reading the template.