日本語

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 doSample
Understand the big picture of osbxl and the class hierarchygeneral-01 Overview
The flow of creating a new book / opening an existing book / save / saveAs / closegeneral-01 Overview — basic flow
What methods App / WorkBook / WorkSheet / Range havegeneral-01 Overview — main methods
Build a table with values and formulasgeneral-02 Values and formulas
Enter per-row shifting formulas (relative references) in bulkgeneral-02 Values and formulas / general-06 Bulk input
Add, delete, move or rename sheetsgeneral-03 Sheet operations
List all sheets of a book whose sheet names you don't knowgeneral-03 Sheet operations
Enter dates, times and booleans / set number formatsgeneral-04 Cell value types
The difference between getValue() and getValue(true)general-04 Cell value types
Insert, delete, clear or copy rows and columnsgeneral-05 Rows, columns and cell ranges
Set row height, column width and hidden stategeneral-05 Rows, columns and cell ranges
Populate tens of thousands of cells fastgeneral-06 Bulk input
Filter or sort data (AutoFilter / Sort)general-07 AutoFilter and sorting
Use tables (totals row, structured references) and commentsgeneral-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 tablesgeneral-11 Pivot tables

general — overview and basic operations

#TitlelevelMain APIs
01Overview — object model and basic flowbasicApp / WorkBook / WorkSheet / Range
02Building a Table with Values and FormulasbasicRange / InputFormulaObject
03Working with books and sheets — add, delete, move, renamebasicWorkBook / WorkSheet
04Cell value types and number formats — strings, numbers, dates, times, booleansbasicRange / DateTimeObject
05Rows, columns and cell ranges — insert, delete, clear, copybasicWorkSheet / Row / Col
06Bulk input of large data — setValueArray / setFormulaArrayintermediateWorkSheet / InputValueObject / InputFormulaObject
07AutoFilter and sorting — conditional filters, sortintermediateAutoFilter / Sort
08Tables and comments — ListObjects, totals row, structured referencesintermediateListObjects / Table / Comments
09Conditional formatting — cell value rules, color scales, data barsintermediateFormatConditions / ColorScaleObject / DataBarObject
10Charts basics — column, line, title, axes, legendintermediateChart / chart.* / enums.XlChartType
11Pivot tables — create, aggregate, change aggregation methodadvancedPivotTable / PivotField

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