ParseCSVRows (open)

Get the raw rows of an (Excel-compatible) CSV/TSV file

Syntax

LOADLIB "wh::filetypes/csv.whlib";

RECORD ARRAY FUNCTION ParseCSVRows(BLOB data, RECORD options)

Parameters

BLOB data

Data to parse

RECORD options

Options

BOOLEAN acceptutf8

If a string is already valid UTF-8, don't convert it. Defaults to TRUE.

BOOLEAN astokenarray

Ignore headers and return all row cells in a STRING ARRAY cell named 'tokens'

STRING param

encoding Excel file encoding ("UNICODE" for UTF-8, "ISO-8859-1", etc). Defaults to ISO-8859-1

BOOLEAN processheaders

Process the first row as headers (defaults to TRUE)

STRING separator

The separator used (\t, ; or ,). If not set, guesses

Return value

RECORD ARRAY

A record array with a record for every item

tokens

A string array with all individual tokens