CsvDataLoadOptions

Inheritance: java.lang.Object

public class CsvDataLoadOptions

Represents options for parsing CSV data.

To learn more, visit the LINQ Reporting Engine documentation article.

Remarks:

An instance of this class can be passed into constructors of CsvDataSource.

Constructors

ConstructorDescription
CsvDataLoadOptions()Initializes a new instance of this class with default options.
CsvDataLoadOptions(boolean hasHeaders)Initializes a new instance of this class with specifying whether CSV data contains column names at the first line.

Methods

MethodDescription
getCommentChar()Gets the character that is used to comment lines of CSV data.
getDelimiter()Gets the character to be used as a column delimiter.
getQuoteChar()Gets the character that is used to quote field values.
hasHeaders()Gets a value indicating whether the first record of CSV data contains column names.
hasHeaders(boolean value)Sets a value indicating whether the first record of CSV data contains column names.
setCommentChar(char value)Sets the character that is used to comment lines of CSV data.
setDelimiter(char value)Sets the character to be used as a column delimiter.
setQuoteChar(char value)Sets the character that is used to quote field values.

CsvDataLoadOptions()

public CsvDataLoadOptions()

Initializes a new instance of this class with default options.

CsvDataLoadOptions(boolean hasHeaders)

public CsvDataLoadOptions(boolean hasHeaders)

Initializes a new instance of this class with specifying whether CSV data contains column names at the first line.

Parameters:

ParameterTypeDescription
hasHeadersboolean

getCommentChar()

public char getCommentChar()

Gets the character that is used to comment lines of CSV data.

Remarks:

The default value is ‘#’ (number sign).

Returns: char - The character that is used to comment lines of CSV data.

getDelimiter()

public char getDelimiter()

Gets the character to be used as a column delimiter.

Remarks:

The default value is ‘,’ (comma).

Returns: char - The character to be used as a column delimiter.

getQuoteChar()

public char getQuoteChar()

Gets the character that is used to quote field values.

Remarks:

The default value is ‘"’ (quotation mark).

Double the character to place it into quoted text.

Returns: char - The character that is used to quote field values.

hasHeaders()

public boolean hasHeaders()

Gets a value indicating whether the first record of CSV data contains column names.

Remarks:

The default value is false .

Returns: boolean - A value indicating whether the first record of CSV data contains column names.

hasHeaders(boolean value)

public void hasHeaders(boolean value)

Sets a value indicating whether the first record of CSV data contains column names.

Remarks:

The default value is false .

Parameters:

ParameterTypeDescription
valuebooleanA value indicating whether the first record of CSV data contains column names.

setCommentChar(char value)

public void setCommentChar(char value)

Sets the character that is used to comment lines of CSV data.

Remarks:

The default value is ‘#’ (number sign).

Parameters:

ParameterTypeDescription
valuecharThe character that is used to comment lines of CSV data.

setDelimiter(char value)

public void setDelimiter(char value)

Sets the character to be used as a column delimiter.

Remarks:

The default value is ‘,’ (comma).

Parameters:

ParameterTypeDescription
valuecharThe character to be used as a column delimiter.

setQuoteChar(char value)

public void setQuoteChar(char value)

Sets the character that is used to quote field values.

Remarks:

The default value is ‘"’ (quotation mark).

Double the character to place it into quoted text.

Parameters:

ParameterTypeDescription
valuecharThe character that is used to quote field values.