Skip to content
TREB Docs

TREBDocument

TREBDocument interface

this is the document type used by TREB. it has a lot of small variations for historical reasons and backwards compatibility. usually it’s preferable to let TREB create and manage these documents rather than creating them manually.

Members
active_sheetoptional
number
number
active sheet. if unset we'll show the first un-hidden sheet
app
string
string
app name, as identifier
decimal_markoptional
'.' | ','
'.' | ','
document decimal mark
macro_functionsoptionaldocument macro functions
nameoptional
string
string
document name
namedoptionalnew consolidated named ranges & expressions
named_expressionsoptionaldocument named expressions @deprecated
named_rangesoptional
Record<string, IArea>
Record<string, IArea>
document named ranges @deprecated
rendered_valuesoptional
boolean
boolean
this document includes rendered calculated values. using this lets the app show a document faster, without requiring an initial calculation.
revisionoptional
number
number
revision number. this is a value that increments on any document change, useful for checking if a document is "dirty".
shared_resourcesoptional
Record<string, string>
Record<string, string>
document shared resources (usually images)
sheet_dataoptionalper-sheet data. this should be an array, but for historical reasons we still support a single sheet outside of an array.
tablesoptionaldocument tables
user_dataoptional
unknown
unknown
opaque user data. we don't read or parse this, but applications can use it to store arbitrary data.
version
string
string
app version. we'll warn if you use a file from a newer version
Referenced by
EmbeddedSpreadsheet.LoadDocument
EmbeddedSpreadsheet.SerializeDocument