API Reference
Namespaces
Classes
Events
Global
Externals

Class: CSVReader

CIQ. CSVReader


new CSVReader(file)

Helper class to read loaded web files with a FileReader.

Parameters:
Name Type Description
file external:File

Web file that the CSVReader should parse.

Since:
  • TBD KB13510

Members


file :external:File

Type:

reader :external:FileReader

Type:

Methods


CSVReader#determineLineBreak(data)

Determines the line break on the File by checking for carriage and newLine return. Progressively reads 5% ofthe file until it finds a value.

Parameters:
Name Type Description
data string

Raw parsed values from the FileReader

Returns:

string Identified line break in the file which will be used to split results


<async, static> CSVReader#parse(file)

Asynchronously parse a File with the FileReader. Determines the linebreak and splits into arrays for fields and data. On resolve returns the results of the file split based on identified line break.

Parameters:
Name Type Description
file external:File

File to passed to the FileReader and parsed.

Returns:
Type
Promise.<Array.<string>>

CSVReader#splitResults(data)

Splits data from the FileReader based on determined linebreak.

Parameters:
Name Type Description
data string

Parsed data from FileReader

Returns:

string[] Split data from the FileReader