Object - io : ReadableCSVChannel
Represents a ReadableCSVChannel which could be used to read records from CSV file.
- byteChannel ReadableCharacterChannel
The CharacterChannel, which will represent the content in the CSV file
- 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
Indicates whether there's another record, which could be read.
boolean hasNext = readableCSVChannel.hasNext();
True if there's a record
()returns string | Error | ()
Gets the next record from the CSV file.
string|io:Error record = readableCSVChannel.getNext();
Return Type(string | Error | ())
List of fields in the CSV or else an
Closes a given
io:Error? err = readableCSVChannel.close();
io:Errorif any error occurred
(typedesc structType)returns table | Error
Returns a table, which corresponds to the CSV records.
var tblResult = readableCSVChannel.getTable(Employee);
- structType typedesc
The object in which the CSV records should be deserialized
Return Type(table | Error)
Table, which represents the CSV records or else an