TREB

Embedding options

If you embed a spreadsheet using a <div/> tag (see here), you can set a couple of options by adding a data-options attribute. Options use a key=value syntax and multiple options are separated with commas.

Available options

load

The name of a function, in the global namespace, to call when the embedded spreadsheet is created. The function will be called with the spreadsheet object and the embedding node.

scroll

An address (in A1 notation) to scroll into view when the spreadsheet is loaded.

scrollbars

Show scrollbars, and allow scrolling generally. Defaults to true.

formula_bar

Show or hide the formula bar. Defaults to true.

show_headers

Show or hide row and column headers. Defaults to true.

recalculate

Recalculate the spreadsheet when it loads. Defaults to false.

resizable

Adds a resize grip to the bottom-right of the spreadsheet so it can be resized (the size may be constrained by page styling). Defaults to true.

Example

Scroll (cell address)
Show Headers
Formula Bar
Scrollbars

Embed tag:

<div data-treb='https://treb.app/doc/histogram-2.treb'></div>

Generated spreadsheet: