Skip to content

XLSX File

Reads and writes data from a XLS/XLSX file.

Categories: helpers

Type: xlsxFile/v1


Actions

Read from File

Name: read

Reads data from a XLS/XLSX file.

Properties

NameLabelTypeControl TypeDescriptionRequired
fileEntryFileFILE_ENTRYFILE_ENTRYThe object property which contains a reference to the XLS/XLSX file to read from.true
sheetNameSheet NameSTRINGTEXTThe name of the sheet to read from in the spreadsheet. If not set, the first one gets chosen.null
headerRowHeader RowBOOLEAN
Options true, false
SELECTThe first row of the file contains the header names.null
includeEmptyCellsInclude Empty CellsBOOLEAN
Options true, false
SELECTWhen reading from file the empty cells will be filled with an empty string.null
pageSizePage SizeINTEGERINTEGERThe amount of child elements to return in a page.null
pageNumberPage NumberINTEGERINTEGERThe page number to get.null
readAsStringRead As StringBOOLEAN
Options true, false
SELECTIn some cases and file formats, it is necessary to read data specifically as string, otherwise some special characters are interpreted the wrong way.null

JSON Example

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

Write to File

Name: write

Writes the data to a XLS/XLSX file.

Properties

NameLabelTypeControl TypeDescriptionRequired
sheetNameSheet NameSTRINGTEXTThe name of the sheet to create in the spreadsheet.null
rowsRowsARRAY
Items [{}]
ARRAY_BUILDERThe array of rows to write to the file.true
filenameFilenameSTRINGTEXTFilename to set for binary data. By default, “file.xlsx” will be used.true

Output

Type: FILE_ENTRY

Properties

NameTypeControl Type
extensionSTRINGTEXT
mimeTypeSTRINGTEXT
nameSTRINGTEXT
urlSTRINGTEXT

JSON Example

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