Bitbybit Docs
    Preparing search index...

    Class ParseToJsonDto (Inputs.CSV)

    Feeds csv.parseToJson: the CSV text, which row holds the headers, where the data starts, the separators and which columns to read as numbers.

    Index

    Constructors

    • Parameters

      • Optionalcsv: string
      • OptionalheaderRow: number
      • OptionaldataStartRow: number
      • OptionalrowSeparator: string
      • OptionalcolumnSeparator: string
      • OptionalnumberColumns: string[]

      Returns ParseToJsonDto

    Properties

    csv: string

    The whole CSV text, headers included

    name,age\nJohn,30\nJane,25
    
    headerRow?: number

    Index of the row whose cells become the object keys, counting from 0 and skipping blank lines

    0
    

    0

    Infinity

    1

    dataStartRow?: number

    Index of the first row turned into an object, counting from 0; normally the row after the headers

    1
    

    0

    Infinity

    1

    rowSeparator?: string

    The text between rows, normally a line break; \n written as two characters is read as one

    \n
    
    columnSeparator?: string

    The text between cells in a row, normally a comma; \t written as two characters is read as a tab

    ,
    
    numberColumns?: string[]

    Header names whose cells are parsed as numbers; every other cell stays text

    undefined
    

    true