Creates an empty workbook. locale, timezone and languageId default
to "en", "UTC" and "en".
Optionallocale: string | nullOptionaltimezone: string | nullOptionallanguageId: string | nullAdds a conditional formatting rule to a range like "A1:B10".
rule is an object, i.e. {type: "CellIs", operator: "GreaterThan",
formula: "5", format: {fill: {color: "#FF0000"}}}
Applies a list of diffs produced by another model's flushSendQueue
Extends the content of the source area right/left until toColumn
Extends the content of the source area downwards/upwards until toRow
Copies the selected area, returning an object with the csv text, the internal data and the copied range
Creates a new named style from a style object. includes selects
which formatting categories the style carries; null means all of them.
Optionalincludes: StyleIncludes | nullOptionalscope: number | nullForces an evaluation of the workbook (only needed while paused)
Returns (and clears) the queue of diffs produced by local edits
Returns all Excel built-in named styles as a list of {name, style}
Returns information about the array (spill) structure of a cell
Returns the content of a cell as the user would see it in the editor: the formula if there is one or the raw value otherwise
Returns the type of the content of a cell
Returns the list of conditional formatting rules of the sheet
Returns the list of defined names as [{name, scope, formula}].
scope is omitted for globally scoped names.
Returns the differential style (dxf) applied by the rule at index
Returns the style of a cell together with any conditional formatting decorations (icon, data bar, rating)
Returns the first non-empty column in the row after column, if any
Returns locale dependent formatting settings (currency, date formats, ...)
Returns the formatted value of a cell (i.e. "$ 5.75")
Returns the last non-empty column in the row before column, if any
Returns the name of the workbook
Returns which formatting categories the named style includes
Returns the names of all named styles in the workbook
Returns the selected cell as [sheet, row, column]
Returns the selected view (sheet, selected range, top left visible cell, ...)
Returns the bounds of all non-empty cells as [minRow, maxRow, minColumn, maxColumn]. For an empty sheet returns [1, 1, 1, 1].
Returns the workbook theme
Returns the list of sheets with their properties (name, state, color, ...)
Throws if the defined name is not valid
Moves columnCount columns starting at column by delta positions
Moves rowCount rows starting at row by delta positions
Moves the sheet to a new position in the list of sheets
Creates a new defined name. scope is a sheet index or null for global scope.
Adds a new sheet with an automatically generated name
Applies a named style to the current selection. If the style is a built-in not yet in the workbook, it is added first.
Pastes a matrix of styles (list of rows, each a list of style objects) starting at the selected cell
Pastes a csv string starting at the top-left corner of the given area
Pastes data copied with copyToClipboard into the selected area
Pauses automatic evaluation after each change
Resolves a color (null, "#RRGGBB" or [theme, tint]) to a CSS hex string using the current workbook theme. Returns "" for no color.
Optionalcolor: Color | nullResumes automatic evaluation after each change
Saves the workbook to a file in the internal binary ic format
Saves the workbook to an xlsx file
Applies a border to an area. borderArea is an object like
{item: {style: "thin", color: "#000000"}, type: "All"}
Sets the name of the workbook
Sets the sheet tab color. Accepts null, "#RRGGBB" or [theme, tint]
Optionalcolor: Color | nullSets the user input in a cell: a value like "3.5", "Hello" or a formula like "=A1*2"
Returns the workbook as bytes in the internal binary ic format
Updates the conditional formatting rule at index
Updates (and possibly renames) an existing named style
Optionalincludes: StyleIncludes | nullUpdates a single style property in all cells of the range.
stylePath examples: "font.b", "font.color", "fill.color",
"alignment.horizontal", "num_fmt". The value is always a string,
i.e. "true", "#FF5566", "center", "#,##0.00".
StaticfromCreates a user model from bytes in the internal binary ic format
OptionallanguageId: string | nullStaticfromCreates a user model from an icalc file
OptionallanguageId: string | nullStaticfrom
A workbook model implementing the "user" API: the same high level API used by the IronCalc web application. Every action evaluates the model, keeps undo/redo history and produces diffs for collaboration.