ExcelWorkbook.model gives it.
Workbook
The workbook’s API for registered functions.
Import from @reductoai/xlsx.
Workbook properties
Workbook.create()
Workbook.open()
Workbook.activate()
index the open tab and the only selected one.
Workbook.addMedia()
bytes as xl/media/image<n>.<extension> related from owner; returns the relationship id.
Workbook.addPart()
owner; returns the relationship id.
Workbook.addRelationship()
owner to a part that already exists, or to an external target; returns the id.
Workbook.addSheet()
Workbook.cachedPicture()
PictureValue.cachedUid.
Workbook.calc()
Workbook.cellEdited()
Workbook.circularReferences()
Workbook.copySheet()
to,
with its sheet-level names; a chart that reads the sheet reads the copy. Throws for a sheet
with tables, comments, pivot tables or legacy VML.
Workbook.defineFunction()
Workbook.deleteDefinedName()
Workbook.deleteSheet()
#REF!, names scoped to it go,
a 3D span that ends on it shrinks, and its parts (drawings, comments, tables) are dropped.
Workbook.drawings()
Workbook.ensureStyles()
Workbook.freePart()
${stem}<n>${ext} for the first n at or past this writer’s floor that names no part.
Workbook.functionsSettled()
save to keep every result.
Workbook.getSheet()
Workbook.hasPart()
Workbook.importSheet()
source’s sheet index in as name at to: cells, formats, rules, drawings and
tables. Comments, pivot tables and controls stay behind, as in Excel on the web.
Workbook.markChanged()
Workbook.markDirty()
rect of sheet sheet calculate again at the next recalc.
Workbook.moveSheet()
to; only 3D spans that end on it change.
Workbook.nameAttr()
comment or hidden attribute; set to null to drop it.
Workbook.nextId()
ids inside this writer’s block.
Workbook.noteStructure()
Workbook.onFunctionResults()
listener runs after function results arrive; read the cells again then. Returns the unsubscribe.
Workbook.onShift()
watch after whole rows or columns are inserted (count > 0) or deleted, with the
sheet’s part name; a shared session renumbers its cells by it. Returns the unsubscribe.
Workbook.partBytes()
xl/media.
Workbook.partRels()
Workbook.partText()
Workbook.peekCalc()
Workbook.pictureOf()
vm) points at.
Workbook.pivotTables()
Workbook.readCalc()
peekCalc, but a file saved with fullCalcOnLoad creates it.
Workbook.recalc()
Workbook.recordOperation()
Workbook.refreshFunctions()
name, or of every function, so formulas compute them again.
Workbook.relatedPart()
/styles.
Workbook.removeFunction()
Workbook.removePart()
Workbook.removeRelationship()
Workbook.renameDefinedName()
Workbook.renameSheet()
Workbook.restore()
Workbook.restructure()
#REF!.
Workbook.rewriteFormulas()
fn.
Workbook.save()
Workbook.sessionHost()
Workbook.setDefinedName()
sheet scopes it to that worksheet.
Workbook.setImageLoader()
IMAGE fetches its pictures with. With none, a formula shows the picture the file saved
for its address, or #BLOCKED!: a workbook on a server fetches nothing unless told to.
Workbook.setIteration()
count times.
Workbook.setNameAttr()
Workbook.setPartBytes()
Workbook.setPartText()
Workbook.setSheetVisibility()
Workbook.settle()
Workbook.sheet()
Workbook.sheetIndexOf()
Workbook.sheetIndexOfKey()
sheetKey, or -1 once deleted.
Workbook.sheetKey()
Workbook.sheetNameOf()
Workbook.sheetNames()
Workbook.sheetPartName()
Workbook.sheetVisibility()
Excel.SheetVisibility of a sheet, from the state in workbook.xml.
Workbook.snapshot()
restore; parts are shared, not copied.
Workbook.styles()
Workbook.tableCellsEdited()
area were written or cleared as a user does it; typed is one cell entered.
A table’s calculated columns follow as in Excel.
Workbook.tableEditor()
Workbook.tableLookup()
Workbook.tables()
Workbook.takeChanges()
Workbook.watchChanges()
take leaves takeChanges whole.
Workbook.workbookPartText()
Worksheet
One sheet; rows and columns are zero-based.
Import from @reductoai/xlsx.
Worksheet properties
Worksheet.clear()
Worksheet.column()
col; widths are in characters.
Worksheet.fillFormula()
Worksheet.formula()
Worksheet.hiddenRows()
first..last are hidden.
Worksheet.merge()
rect, as Range.merge does.
Worksheet.picture()
Worksheet.row()
Worksheet.setArrayFormula()
rect.
Worksheet.setColumns()
Worksheet.setDataTable()
rect, its result cells; attrs is the <f t="dataTable">.
Worksheet.setFormula()
ParseError or LexError when the text is not a formula we read.
Worksheet.setRow()
Worksheet.setRowIndexes()
Worksheet.setRows()
first..last; a change in visibility recalculates SUBTOTAL once.
Worksheet.setStyle()
keep.
Worksheet.setValue()
PictureValue places a picture in the cell, as Insert > Picture > Place in Cell does.
Worksheet.shownFormula()
Worksheet.spillArea()
Worksheet.styleAt()
customFormat), else its column’s, else 0.
Worksheet.unmerge()
Worksheet.value()
WorkbookCalc
The workbook side: stored values, defined names, and where results go.
Import from @reductoai/xlsx.
WorkbookCalc properties
WorkbookCalc.addSheet()
WorkbookCalc.barrier()
SPILL_TABLE inside a table, SPILL_MERGED in a merged area, else 0.
WorkbookCalc.barriersChanged()
sheet that covers, or tried to cover, more than its anchor runs again.
WorkbookCalc.cellLoaded()
WorkbookCalc.cellLoading()
WorkbookCalc.clear()
WorkbookCalc.clearResults()
WorkbookCalc.collapseSpills()
sheets to its anchor: spilled values are results, not cells a move or shift carries.
WorkbookCalc.column()
WorkbookCalc.extent()
WorkbookCalc.filterChanged()
WorkbookCalc.formulaText()
=, or null for a constant; a shared-formula child prints its master’s formula from its own cell.
WorkbookCalc.functionsChanged()
WorkbookCalc.name()
WorkbookCalc.namesChanged()
WorkbookCalc.parseAt()
WorkbookCalc.read()
WorkbookCalc.referencesChanged()
WorkbookCalc.rowFiltered()
WorkbookCalc.rowHidden()
WorkbookCalc.rowVisibilityChanged()
WorkbookCalc.savesAsArray()
t="array" with cm).
WorkbookCalc.scan()
WorkbookCalc.setArrayFormula()
WorkbookCalc.setDataTable()
attrs is the <f t="dataTable"> over area, the result cells.
WorkbookCalc.setFormula()
WorkbookCalc.setValue()
WorkbookCalc.sheetCount()
WorkbookCalc.sheetIndex()
WorkbookCalc.sheetName()
WorkbookCalc.spill()
WorkbookCalc.spilled()
ref on its area; a typed one becomes a dynamic array once it needs to be.
WorkbookCalc.storedFormula()
text at the cell as the file stores it, and whether it is a dynamic-array formula.
WorkbookCalc.write()
null clears a cell a spill no longer covers; rich comes with a #SPILL! or #CALC! a formula made.
blankWorkbookBytes()
@reductoai/xlsx/blank.