api/csv Functions
Functions from src/api/csv.ts
Functions exported from src/api/csv.ts
csvToSheet
function csvToSheet(text: string, opts?: CSV2SheetOpts): WorkSheetParameters
| Name | Type | Description |
|---|---|---|
| text | string | CSV text to parse |
| opts (optional) | CSV2SheetOpts | Optional: { FS: field separator (default ",") } |
Returns
WorkSheet
A WorkSheet with the parsed data
sheetToCsv
function sheetToCsv(sheet: WorkSheet, opts?: Sheet2CSVOpts): stringParameters
| Name | Type | Description |
|---|---|---|
| sheet | WorkSheet | The worksheet to convert |
| opts (optional) | Sheet2CSVOpts | Optional CSV generation options (FS, RS, skipHidden, strip, blankrows, rawNumbers, forceQuotes) |
Returns
string
The CSV string representation of the worksheet
sheetToTxt
function sheetToTxt(sheet: WorkSheet, opts?: Sheet2CSVOpts): stringParameters
| Name | Type | Description |
|---|---|---|
| sheet | WorkSheet | The worksheet to convert |
| opts (optional) | Sheet2CSVOpts | Optional CSV/TSV generation options (same as sheetToCsv) |
Returns
string
The TSV string representation of the worksheet