Skip to content

Sheet handle

Sheet handle · Type

Open-workbook handle returned by mash.sheet.open(file).

Writes accumulate in PHP; every read or save is ONE bridge run carrying all pending ops (batch shape: do your set() calls first, then read or save). Reads always recalculate through the engine, so a get() after set() returns the recomputed value; formulas outside the engine’s tier keep the file’s cached value (flagged() counts them).

sheet.flagged() → int

Formulas the engine could not recalculate on the last run.

sheet.get(ref: string)

Read one cell (recalculated; pending set() values included).

sheet.recalc() → int

Recalculate now; returns the count of formulas kept at cached values.

sheet.save(folder: File, name?: string, overwrite?: bool = true) → Document

Save the filled workbook into a folder (share root or subfolder object), e.g. book.save(root, "Reports/Filled.xlsx"). Untouched parts stay byte-identical; recalculated cells carry fresh caches.

sheet.set(ref: string, value?: mixed) → Handle

Write a value into a cell: number, boolean, text, “=formula”, or null/"" to clear. Returns the handle for chaining.

sheet.sheet(name?: string) → Handle

Target a sheet by name for subsequent set/get calls (default: first sheet).

sheet.sheetNames() → array

Sheet names in workbook order.

sheet.values(range: string) → array

Read a range like “A1:C10” as an array of row arrays.