public final class CsvLoadOptions extends LoadOptions
Constructor and Description |
---|
CsvLoadOptions(char separator)
Initializes a new instance of the
CsvLoadOptions class. |
CsvLoadOptions(CsvType csvType)
Initializes a new instance of the
CsvLoadOptions class. |
Modifier and Type | Method and Description |
---|---|
Charset |
getCharset()
Gets the charset for the CSV file.
|
NumberType |
getNumberStyles()
Gets a value indicating numeric type used when parsing strings to numeric types.
|
Locale |
getParseLocale()
Gets the locale for the CSV file.
|
char |
getSeparator()
Gets character that serves as value delimiter.
|
Optional<CsvType> |
getType()
Gets value delimiter type, see
CsvType . |
boolean |
hasFormulas()
Gets a value indicating the text is formula if it starts with '='.
|
boolean |
hasQuotedValues()
Gets a value indicating whether values in CSV file can be quoted.
|
boolean |
isAllowNewLineInQuotes()
Gets a value indicating whether a new line character can be inside quotes.
|
boolean |
isParseNumbers()
Gets a value indicating whether numbers will be parsed and stored as
double value when loading CSV file. |
void |
setAllowNewLineInQuotes(boolean allowNewLineInQuotes)
Sets a value indicating whether a new line character can be inside quotes.
|
void |
setCharset(Charset value)
Sets the charset for the CSV file.
|
void |
setHasFormulas(boolean hasFormulas)
Sets a value indicating the text is formula if it starts with '='.
|
void |
setHasQuotedValues(boolean hasQuotedValues)
Sets a value indicating whether values in CSV file can be quoted.
|
void |
setNumberStyles(NumberType numberType)
Sets a value indicating numeric type used when parsing strings to numeric types.
|
void |
setParseLocale(Locale locale)
Sets the locale for the CSV file.
|
void |
setParseNumbers(boolean value)
Sets a value indicating whether numbers will be parsed and stored as
double value when loading CSV file. |
void |
setSeparator(char separator)
Sets character that serves as value delimiter.
|
void |
setType(CsvType type)
Sets value delimiter type, see
CsvType . |
getCsvDefault, getHtmlDefault, getOdsDefault, getXlsDefault, getXlsxDefault
public CsvLoadOptions(char separator)
CsvLoadOptions
class.separator
- Character that will serve as value delimiter.public CsvLoadOptions(CsvType csvType)
CsvLoadOptions
class.csvType
- Value delimiter, CsvType
.public Charset getCharset()
public NumberType getNumberStyles()
Default value is NumberType.DOUBLE
NumberType
public Locale getParseLocale()
public char getSeparator()
public boolean hasFormulas()
public boolean hasQuotedValues()
true
.public boolean isAllowNewLineInQuotes()
true
.public boolean isParseNumbers()
double
value when loading CSV file. If false
, numbers will be loaded as strings. Default value is true
.public void setAllowNewLineInQuotes(boolean allowNewLineInQuotes)
true
.public void setCharset(Charset value)
NullPointerException
- Value is set to null
.public void setHasFormulas(boolean hasFormulas)
public void setHasQuotedValues(boolean hasQuotedValues)
true
.public void setNumberStyles(NumberType numberType)
Default value is NumberType.DOUBLE
NumberType
public void setParseLocale(Locale locale)
NullPointerException
- locale is set to null
.public void setParseNumbers(boolean value)
double
value when loading CSV file. If false
, numbers will be loaded as strings. Default value is true
.public void setSeparator(char separator)
IllegalArgumentException
- Value is set to quote '"' or new line '\n'.public void setType(CsvType type)
CsvType
.NullPointerException
- type is set to null
.© GemBox Ltd. — All rights reserved.