[]
Each Workbook instance contains exactly one DataManager.
This instance is created internally when the Workbook is initialized.
To access it:
var dataManager = spread.dataManager();The returned object is the central entry point for:
Creating tables
Managing relationships
Defining structured data models
Preparing data for component binding
All structured data operations within a Workbook must go through this DataManager instance.
The DataManager retrieved from spread.dataManager() is owned by the Workbook.
SpreadJS components such as:
TableSheet
GanttSheet
ReportSheet
Data Chart
operate exclusively on the Workbook’s internal DataManager.
Because of this:
You cannot replace the Workbook’s DataManager.
You cannot inject an external DataManager into a Workbook.
This ensures that all structured components share a consistent data model within the same Workbook.
Other SpreadJS features such as standard worksheet tables, PivotTable, formulas, and charts can operate directly on worksheet ranges and do not require the DataManager.
With access to the DataManager, you can:
Create tables using addTable
The following section explains how to create and configure tables.