Skip to content

CSV File

Reads and writes data from a csv file.

Categories: helpers

Type: csvFile/v1


Actions

Read from File

Name: read

Reads data from a csv file.

Properties

NameLabelTypeDescriptionRequired
fileEntryFileFILE_ENTRYThe object property which contains a reference to the csv file to read from.true
delimiterDelimiterSTRINGCharacter used to separate values within the line red from the CSV file.null
enclosingCharacterEnclosing CharacterSTRINGCharacter used to wrap/enclose values. It is usually applied to complex CSV files where values may include delimiter characters.null
headerRowHeader RowBOOLEAN
Options true, false
The first row of the file contains the header names.null
includeEmptyCellsInclude Empty CellsBOOLEAN
Options true, false
When reading from file the empty cells will be filled with an empty string.null
pageSizePage SizeINTEGERThe amount of child elements to return in a page.null
pageNumberPage NumberINTEGERThe page number to get.null
readAsStringRead as StringBOOLEAN
Options true, false
In some cases and file formats, it is necessary to read data specifically as string, otherwise some special characters are interpreted the wrong way.null

Example JSON Structure

{
"label" : "Read from File",
"name" : "read",
"parameters" : {
"fileEntry" : {
"extension" : "",
"mimeType" : "",
"name" : "",
"url" : ""
},
"delimiter" : "",
"enclosingCharacter" : "",
"headerRow" : false,
"includeEmptyCells" : false,
"pageSize" : 1,
"pageNumber" : 1,
"readAsString" : false
},
"type" : "csvFile/v1/read"
}

Output

The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.

Write to CSV File

Name: write

Writes the data records into a CSV file. Record values are assembled into line and separated with arbitrary character, mostly comma. CSV may or may not define header line.

Properties

NameLabelTypeDescriptionRequired
rowsRowsARRAY
Items [{}]
The array of rows to write to the file.true
filenameFilenameSTRINGFilename to set for binary data. By default, “file.csv” will be used.null

Example JSON Structure

{
"label" : "Write to CSV File",
"name" : "write",
"parameters" : {
"rows" : [ { } ],
"filename" : ""
},
"type" : "csvFile/v1/write"
}

Output

Type: FILE_ENTRY

Properties

NameTypeDescription
extensionSTRING
mimeTypeSTRING
nameSTRING
urlSTRING

Output Example

{
"extension" : "",
"mimeType" : "",
"name" : "",
"url" : ""
}