public class CsvImporter
extends java.lang.Object
Worksheet.| Modifier and Type | Class and Description |
|---|---|
static interface |
CsvImporter.RowReceiver |
| Constructor and Description |
|---|
CsvImporter() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getEncoding()
Gets the encoding used.
|
char |
getQuote()
Gets the character used as a quote.
|
char |
getSeparator()
Gets the character used as a separator.
|
void |
importData(java.io.InputStream stream,
CsvImporter.RowReceiver rowReceiver) |
boolean |
importData(java.io.InputStream stream,
Worksheet worksheet)
Imports the specified CSV stream into the specified worksheet.
|
void |
importData(java.lang.String filePath,
CsvImporter.RowReceiver rowReceiver) |
boolean |
importData(java.lang.String filePath,
Worksheet worksheet)
Imports the specified CSV file into the specified worksheet.
|
void |
setEncoding(java.lang.String value)
Sets the encoding used.
|
void |
setQuote(char value)
Sets the character used as a quote.
|
void |
setSeparator(char value)
Sets the character used as a separator.
|
public boolean importData(java.lang.String filePath,
Worksheet worksheet)
throws java.io.IOException
filePath - A string specifying the path to the CSV file.worksheet - The Worksheet instance where to import the data.true if the data was successfully loaded; otherwise, false.java.io.IOExceptionpublic boolean importData(java.io.InputStream stream,
Worksheet worksheet)
throws java.io.IOException
stream - A stream containing the CSV contents.worksheet - The Worksheet instance where to import the data.true if the data was successfully loaded; otherwise, false.java.io.IOExceptionpublic void importData(java.lang.String filePath,
CsvImporter.RowReceiver rowReceiver)
throws java.io.IOException
java.io.IOExceptionpublic void importData(java.io.InputStream stream,
CsvImporter.RowReceiver rowReceiver)
throws java.io.IOException
java.io.IOExceptionpublic char getSeparator()
public void setSeparator(char value)
public char getQuote()
public void setQuote(char value)
public java.lang.String getEncoding()
public void setEncoding(java.lang.String value)