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
importCsvText(text: string, options?: { delimiter?: CsvDelimiter; hasHeader?: boolean }): Promise<{ rowCount: number; columnCount: number }>| Arguments | Required | Type |
|---|---|---|
| text | Required | string |
| options | Optional | { 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
- Import CSV
CSV import converts delimited text into new columns and rows. Unlike a transaction that appends rows, importCsvText replaces columnDefs and rowData.