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.

freeze_rows

The number of rows frozen at the top of the sheet. Defaults to 0.

freeze_columns

The number of columns frozen at the top of the sheet. Defaults to 0.

recalculate

Recalculate the spreadsheet when it loads. Defaults to false.

Example

Scroll
Freeze Rows
Freeze Columns
Show Headers
Formula Bar
Scrollbars

Embed tag:

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

Result: