API REFERENCE

importCsvText

Parses CSV text and replaces columns and source data. For appending rows, parse separately and use transactions.

What does this API do?

Parses CSV text and replaces columns and source data. For appending rows, parse separately and use transactions.

Exact input and result types

typescript
importCsvText(text: string, options?: { delimiter?: CsvDelimiter; hasHeader?: boolean }): Promise<{ rowCount: number; columnCount: number }>
ArgumentsRequiredType
textRequiredstring
optionsOptional{ delimiter?: CsvDelimiter; hasHeader?: boolean }

The return type is Promise<{ rowCount: number; columnCount: number }>.

Usage flow

After registering and initializing the Grid element, call grid.importCsvText(…). Read the return value with await. For methods returning a boolean or report, inspect the result before continuing.

Read related types

Feature explanations and examples