Module csv
csv:read(String file_name, encoding = ‘utf-8’, delimiter = ‘,’; [String]? &header = N)
csv:read(String file_name, encoding = ‘utf-8’, delimiter = ‘,’; skip_first_row = 1B)
csv:read(File &&file; delimiter = ‘,’; [String]? &header = N)
csv:read(File &&file; delimiter = ‘,’; skip_first_row = 1B)
csv:read_str(String file_contents, delimiter = ‘,’; [String]? &header = N)
csv:read_str(String file_contents, delimiter = ‘,’; skip_first_row = 1B)
Return a reader object which will iterate over records in the given csv file. The optional header parameter specifies an array that will take the value of the first row of the csv file.
Why not csv:Reader()?
csv:Writer(String file_name, encoding = ‘utf-8’, delimiter = ‘,’)
csv:Writer(File &&file; delimiter = ‘,’)
Writer object responsible for converting the user's data into delimited strings in the csv file named file_name or specified in the file parameter.
csv:Writer object methods
write_row(Array row)
Write record to the csv file. row is an array of any items which can be converted to String.