Top
You are looking at an outdated 7.4.0 version of this document. Switch to the 7.14.3 version to see the up to date information.

class anychart.data.csv.Parser Improve this Doc

Extends: goog.Disposable

The Parser.

Methods Overview

Miscellaneous
columnsSeparator()Cols separator settings.
ignoreFirstRow()Header row ignorance settings.
ignoreTrailingSpaces()If the trailing spaces around the value should be ignored.
parse()Parses CSV. In a process of parsing the methods of ICSVItemsProcessor are called.
rowsSeparator()Rows separator settings.

Methods Description

columnsSeparator

Cols separator settings.

Params:

Name Type Description
value string

Returns:

anychart.data.csv.Parser string -

ignoreFirstRow

Header row ignorance settings.

Params:

Name Type Description
value boolean If the row should be ignored.

Returns:

anychart.data.csv.Parser boolean -

ignoreTrailingSpaces

If the trailing spaces around the value should be ignored.

Params:

Name Type Description
value boolean If the trailing spaces around the value should be ignored.

Returns:

anychart.data.csv.Parser boolean -

parse

Parses CSV. In a process of parsing the methods of ICSVItemsProcessor are called.

Params:

Name Type Description
data string Plain csv data.
itemsProcessor anychart.data.csv.IItemsProcessor Item processor to use. If none passed - uses default processor.
async boolean Indicates async processing. Async processing can be activated only if a custom items processor passed.

Returns:

Array.<Array> null - If no items processor passed, returns parsed data as an array of rows. Each row is an array of strings in that case.

rowsSeparator

Rows separator settings.

Params:

Name Type Description
value string

Returns:

anychart.data.csv.Parser string -