Skip to main content

CSV Library

The CSV library provides a parsing module that converts CSV text into an array of rows and fields. It supports quoted fields, embedded separators and newlines and configurable separators.

Import the CSV library into your project. Only the CSVparse module is needed to be required in order to mask the data.

require "CSV.CSVparse"   

How it works:

Use the Translator's built in help to review how to use the function.

CSVparse - performs the parsing for the supplied CSV data.

The function takes a CSV-formatted string and converts it into a table of parsed rows, with each row returned as an array of field values. In Lua terms, a table of tables.

It supports quoted and multiline fields, custom separators, whitespace normalization for unquoted values, and raises errors for malformed CSV input.