• Cell matrix of a TSV text from the clipboard (Excel, Google Sheets, LibreOffice, a text editor): line breaks \r\n, \n or \r; a cell that starts with a quotation mark is quoted ("" inside = one quotation mark, line breaks and tabs inside belong to the cell); one line break at the end is ignored; a byte order mark is removed; shorter rows are filled with "". DOM-free.

    Parameters

    • text: string

      the clipboard text

    Returns string[][]

    rows of cell texts, all of the same length; [] for ""

    Example

    parseTsv('a\t"x\ny"\r\n1\t2\r\n');   // [["a", "x\ny"], ["1", "2"]]
    

    Since

    1.1.99