Skip to main content

The File Utils JavaScript library

JavaScript methods for parsing and uploading files.

The fileUtils JavaScript library includes methods to parse CSV, JSON, and XLSX files.

These methods are not available within transformers.

Methods

JavaScript API methods for interacting with fileUtils. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.

parseCSV

Parses a CSV file. Returns a Promise that resolves to a list of objects with one key per column.

fileUtils.parseCSV(parseCSVOptions)
Parameters

parseCSVOptions

object
Properties

The value.




parseJSON

Parses a JSON file. Returns a Promise that resolves to a list of objects with one key per column.

fileUtils.parseJSON(parseJSONOptions)
Parameters

parseJSONOptions

object
Properties

The value.




parseXLSX

Parses an XLSX file. Returns a Promise that resolves to a list of objects with one key per column.

fileUtils.parseXLSX(parseXLSXOptions)
Parameters

parseXLSXOptions

object
Properties

The value.