SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Function toColumns

    • Splits text into columns of slots.

      Parameters

      • text: string

        The text to stack (line breaks are \n).

      • wrapped: boolean

        true when the cell wraps: line breaks start new columns and a column longer than capacity breaks (see the module notes). false keeps one column with a line break as a blank slot.

      • capacity: number

        The slots per column before a wrapped column breaks. Pass Number.MAX_SAFE_INTEGER to split on line breaks only (the measure Excel's autofit uses).

      Returns string[][]

      Columns keep their leading/trailing spaces — those count for measurement. layoutColumns trims them for painting.