Divooka Reference

Spreadsheet Files

4 nodes

On this page 4

Read All Sheets

Function

Every sheet of an .xlsx workbook as a table, in order.

Signature
ReadAllSheets(path: Text, header: Truth) -> Table Array
Table[] ReadAllSheets(string path, bool header = true)

Parameters

nametypedefaultdescription
pathText—The workbook (.xlsx).
headerTruthTrueWhether each sheet's first row holds its column names.

Returns

TablesTable Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Spreadsheet Files
Package
Data Analytics

Read Spreadsheet

Function

A sheet of an .xlsx workbook as a table: the first sheet when none is named. Each cell keeps the kind the spreadsheet gave it, so numbers stay numbers, text stays text and date-formatted cells are dates; an error cell is empty.

Signature
ReadSpreadsheet -> Table
    path: Text
    sheet: Text
    header: Truth
    skipRows: Integer
    range: Text
Table ReadSpreadsheet(
    string path,
    string sheet = "",
    bool header = true,
    int skipRows = 0,
    string range = "")

Parameters

nametypedefaultdescription
pathText—The workbook (.xlsx).
sheetText—The sheet's name; the first sheet when empty.
headerTruthTrueWhether the first row holds the column names.
skipRowsInteger0How many rows to pass over first - a title above the table.
rangeText—Only these cells, written as a sheet writes them ("B2:E40"); the whole sheet when empty.

Returns

TableTable
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Spreadsheet Files
Package
Data Analytics

Sheet Names

Function

The names of an .xlsx workbook's sheets, in order.

Signature
SheetNames(path: Text) -> Text Array
string[] SheetNames(string path)

Parameters

nametypedefaultdescription
pathText—The workbook (.xlsx).

Returns

NamesText Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Spreadsheet Files
Package
Data Analytics

Write Spreadsheet

Function

Writes tables to an .xlsx workbook, a sheet each - a bold header kept in view while scrolling, a filter on every column, dates formatted as dates, columns wide enough to read - and gives back the file's path. Sheets are named by Sheet Names, else by each table's name, else Sheet1, Sheet2 and so on. Each chart in Charts follows on a sheet of its own, named after it: a native chart, its data from A1 and the chart beside it, as Save Chart writes a workbook; Written As says which charts are native and which are pictures.

Signature
WriteSpreadsheet -> (Path: Text, writtenAs: Text)
    tables: Table Array
    path: Text
    sheetNames: Text Array
    charts: Figure Array
string WriteSpreadsheet(
    Table[] tables,
    string path,
    out string writtenAs,
    string[] sheetNames,
    Figure[] charts)

Parameters

nametypedefaultdescription
tablesTable Array—The tables, a sheet each, in order.
pathText—The workbook to write (.xlsx); its folder is created if need be.
sheetNamesText Array—What to call each sheet, in the same order; optional.
chartsFigure Array—Charts to write after the tables, a sheet each; optional.

Returns

PathText
writtenAsText
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Spreadsheet Files
Package
Data Analytics