Workbook Data Structure
IWorkbookData
IWorkbookData
represents the snapshot of a workbook in Univer Sheet.
Properties
Property | Type | Description |
---|---|---|
id | string | Unique identifier of the Univer Sheets. |
name | string | Name of the Univer Sheets. |
appVersion | string | Version of the Univer model definition. |
locale | LocaleType | Locale of the document. |
styles | Record<string, Nullable<IStyleData>> | Style references for the workbook. |
sheetOrder | string[] | Array of sheet IDs representing the order of worksheets. |
sheets | { [sheetId: string]: Partial<IWorksheetData> } | Record containing data for each worksheet. |
resources? | IResources | Store the data of plugins |
Example
const workbookData: IWorkbookData = {
id: 'unique-workbook-id',
name: 'My Workbook',
appVersion: '1.0.0',
locale: LocaleType.EN_US,
styles: { /* style definitions */ },
sheetOrder: ['sheet1', 'sheet2'],
sheets: {
sheet1: { /* sheet data */ },
sheet2: { /* sheet data */ },
},
}
Usage
IWorkbookData is the object used to store data in Univer Sheets. It is mainly used for:
resources
property is used to store plugin data. Go to Plugin Custom Model