Object - io : ReadableCSVChannel

Represents a ReadableCSVChannel which could be used to read records from CSV file.



(ReadableCharacterChannel byteChannel, Separator fs, int nHeaders)

  • fs Separator ,
  • Field separator, which will separate between the records in the CSV file

  • nHeaders int 0
  • Number of headers, which should be skipped prior to reading records




returns boolean

Indicates whether there's another record which could be read.

  • Return Type

  • True if there's a record



returns string | Error | ()

Gets the next record from the CSV file.

  • Return Type

    (string | Error | ())
  • List of fields in the CSV or Error if any error occurred



returns Error?

Closes a given CSVChannel.

  • Return Type

  • Returns Error if any error occurred


(typedesc structType)

returns table | Error

Returns a table which corresponds to the CSV records.


  • structType typedesc
  • The object the CSV records should be deserialized

  • Return Type

    (table | Error)
  • Table which represents CSV records or Error if any error occurred