Sheet kit command

data.textToColumns

Text to Columns

Splits the text of a one-column range into several columns at delimiters or fixed widths.

Kit
Sheet 0.1.0 (.xlsx (and opens .xlsm, .xls, .xltx, .csv, .ods, .xlsb))
Changes the document
yes

Parameters

Parameters of data.textToColumns
NameTypeRequiredDescription
delimitersstring[]noeach one character; tab is " "
destinationstringnolike B1; the top-left cell of the result; default the range start
fixedWidthsinteger[]nocolumn widths in characters, instead of delimiters
otherstringnoone more delimiter character, e.g. "|"
rangestringnoan A1 range of one column; default the selection
textQualifierstringnoone character that quotes a field; default the double quote
treatConsecutivebooleanno

Call through sheet_run

text
sheet_run {
  "path": "<file>.xlsx",
  "steps": [{ "command": "data.textToColumns" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: delimiters, destination, fixedWidths, other, range, textQualifier, treatConsecutive. sheet_run answers the step’s result in completed[i].result.

Result

The kit gives no result schema for this command.

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "delimiters": {
      "description": "each one character; tab is \"\t\"",
      "items": {
        "description": "like ,",
        "type": "string"
      },
      "type": "array"
    },
    "destination": {
      "description": "like B1; the top-left cell of the result; default the range start",
      "type": "string"
    },
    "fixedWidths": {
      "description": "column widths in characters, instead of delimiters",
      "items": {
        "type": "integer"
      },
      "type": "array"
    },
    "other": {
      "description": "one more delimiter character, e.g. \"|\"",
      "type": "string"
    },
    "range": {
      "description": "an A1 range of one column; default the selection",
      "type": "string"
    },
    "textQualifier": {
      "description": "one character that quotes a field; default the double quote",
      "type": "string"
    },
    "treatConsecutive": {
      "type": "boolean"
    }
  },
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (sheet_commands through @kition/[email protected], built from KitionAI/kition-sheet@82f13b2). As data: commands.jsonl.