osbxl Sample Collection
These osbxl samples have all been executed and verified. The code on each page runs as-is. Every code block switches between four language tabs — Node.js / Python / Java / WebAssembly — and the install instructions shown per tab are language-specific too.
If you are new here, start with general-01 Overview — object model and basic flow.
Find a sample by what you want to do
| What you want to do | Sample |
|---|---|
| Understand the big picture of osbxl and the class hierarchy | general-01 Overview |
| The flow of creating a new book / opening an existing book / save / saveAs / close | general-01 Overview — basic flow |
| What methods App / WorkBook / WorkSheet / Range have | general-01 Overview — main methods |
| Build a table with values and formulas | general-02 Values and formulas |
| Enter per-row shifting formulas (relative references) in bulk | general-02 Values and formulas / general-06 Bulk input |
| Add, delete, move or rename sheets | general-03 Sheet operations |
| List all sheets of a book whose sheet names you don't know | general-03 Sheet operations |
| Enter dates, times and booleans / set number formats | general-04 Cell value types |
The difference between getValue() and getValue(true) | general-04 Cell value types |
| Insert, delete, clear or copy rows and columns | general-05 Rows, columns and cell ranges |
| Set row height, column width and hidden state | general-05 Rows, columns and cell ranges |
| Populate tens of thousands of cells fast | general-06 Bulk input |
| Filter or sort data (AutoFilter / Sort) | general-07 AutoFilter and sorting |
| Use tables (totals row, structured references) and comments | general-08 Tables and comments |
| Set conditional formatting (color scales, data bars, top N) | general-09 Conditional formatting |
| Create charts (column, line) | general-10 Charts |
| Aggregate with pivot tables | general-11 Pivot tables |
general — overview and basic operations
Planned (not yet written)
general
Book properties (setCompanyName / setCreateAuthor etc.) / named ranges (getNames) / custom styles (addCustomStyle / addCustomTableStyle) / external workbook integration (addExternalWorkBook / updateExternalWorkBook) / password-protected books (openPasswordWorkBook / save(password)) / outlining in detail
format
Fonts and colors / borders / fills and gradients / alignment and wrapping / number formats (numeric, date, currency) / built-in and custom styles (for conditional formatting see general-09)
data
Cell merging / hyperlinks (for tables, sorting, AutoFilter and comments see general-07 / general-08)
formula
Formula basics and array formulas / financial functions (ACCINT etc.) / lookup functions (XLOOKUP) / forecasting (FORECAST.ETS) / WEBSERVICE + FILTERXML
pivot
Aggregation and grouping (for the basics of creating and aggregating see general-11)
chart
Chart varieties / data labels / formatting (colors, lines, shadows) (for basic creation, axes and legend see general-10)
advanced
Page setup and printing / protection / windows and gridlines / Shapes