Skip to content
TREB Docs

API Reference

This is the API reference for TREB version 29.3. It is generated from the typings file treb.d.ts, which is included when you install the npm library @trebco/treb.

You can also download a zip file with the script and the typings file.

Members

TREBsingle instance of factory class
StandardGradientsList

Classes

TREBGlobalAPI class for creating spreadsheets.
EmbeddedSpreadsheetembedded spreadsheet

Interfaces

AddressOffsetoffset from corner, as % of cell
AnnotationChartData
AnnotationDataBasesplitting persisted data from the annotation class.
AnnotationExternalData
AnnotationImageData
AnnotationLayoutrepresents the layout of an annotation, reference to the sheet
AnnotationTextBoxData
BaseCellData
CellDataWithAddressthis type is for serialized data that includes the row and column in each cell.
CellDataWithColumnthis type is for serialized data that is grouped by row, with each cell referencing a column in the spreadsheet.
CellDataWithRowthis type is for serialized data that is grouped by column, with each cell referencing a row in the spreadsheet.
CellStylestyle properties applied to a single cell, row, column, or sheet.
CellStyleRecord
Colorcolor for cell style.
ComplexComplex number type
Cornerrepresents one corner of a layout rectangle
DataChangeEventThis event is sent when data in the spreadsheet changes, but there are no structural or cell changes.
DataValidationBase
DataValidationBoolean
DataValidationDate
DataValidationList
DataValidationNumber
DataValidationRange
DimensionedQuantity
DocumentChangeEventThis event is sent when the value of a cell changes, or when the document structure chages.
DocumentLoadEventThis event is sent when a document is loaded, and also on undo.
DocumentResetEventThis event is sent when the document is reset.
EmbeddedSpreadsheetOptionsoptions for creating spreadsheet
EvaluateOptionsoptions for the evaluate function
ExportOptionsoptions for exporting CSV/TSV
ExternalEditorConfig
FocusViewEventThis event is sent when the focused view changes, if you have more than one view.
FontSizefont size for cell style.
FreezePane
GetRangeOptionsoptions for the GetRange method
IAreaStructure represents a 2d range of cells.
ICellAddressStructure represents a cell address.
ImageAnnotationData
ImageSize
InsertTableOptionsoptions when inserting a table into a sheet
IRectanglestructure represents rectangle coordinates
LoadDocumentOptionsoptions for the LoadDocument method
NestedCellData
NestedColumnData
NestedRowData
Point
ResizeEvent
SaveOptionsoptions for saving files.
ScrollOffset
SelectionEventThis event is sent when the spreadsheet selection changes.
SerializedGridSelectiontemporarily splitting into a serialized version that uses IArea instead of Area.
SerializedMacroFunction
SerializedNamedserialized type is a composite of expression/range.
SerializedNamedExpression
SerializedSheet
SerializeOptionsoptions for serializing data
SetRangeOptionsoptions for the SetRange method
SheetScrollOptionsoptions for the ScrollTo method.
Tablestruct representing a table
TableSortOptions
TableThemecomposite styling for tables.
TREBDocumentthis is the document type used by TREB.
ViewChangeEventThis event is sent when the view changes -- at the moment, that only means the view scale has been changed.

Types

AddressReferencetype represents a reference passed in to API functions.
AnnotationData
AnnotationType
BorderConstants
CellValue
DataValidation
DependencyList
EmbeddedSheetEventEmbeddedSheetEvent is a discriminated union.
ExternalEditorCallback
HorizontalAlignhorizontal align constants for cell style
LoadSource
LoadType
RangeReferencetype represents a reference passed in to API functions.
SerializedCellData
SerializedValueTypestring types for import/export
TableFilterFunctionfunction type used for filtering tables
TableSortType
VerticalAlignvertical align constants for cell style