API 参考

IWorkbookData

本 API 页面目前提供英文正文。代码签名与标识符不随界面语言变化。

A workbook snapshot containing worksheet data, worksheet order, shared styles, and plugin resources. FWorkbook.save returns this structure. Editing the returned snapshot does not update the live workbook; use the Facade methods to edit it.

Import

TypeScript
import type { IWorkbookData } from '@univerjs/core'

Definition

TypeScript
interface IWorkbookData {  id: string  rev?: number  name: string  appVersion: string  locale: LocaleType  dateSystem?: DateSystem  styles: Record<string, Nullable<IStyleData>>  sheetOrder: string[]  sheets: {    [sheetId: string]: Partial<IWorksheetData>  }  defaultStyle?: Nullable<IStyleData> | string  resources?: IResources  custom?: CustomData}

Fields

id

Required · string

Id of the Univer Sheet.

rev

Optional · number | undefined

Revision of this spreadsheet. Used in collaborated editing. Starts from one.

name

Required · string

Name of the Univer Sheet.

appVersion

Required · string

Version of Univer model definition.

locale

Required · LocaleType

Locale of the document.

dateSystem

Optional · DateSystem | undefined

Date serial system used by this workbook. Missing values mean Excel 1900.

styles

Required · Record<string, Nullable<IStyleData>>

Style references.

sheetOrder

Required · string[]

Ids of IWorksheetDatas of this Univer Sheet in sequence order.

sheets

Required · { [sheetId: string]: Partial<IWorksheetData>; }

Data of each IWorksheetData in this Univer Sheet.

defaultStyle

Optional · string | Nullable<IStyleData>

resources

Optional · IResources | undefined

Resources of the Univer Sheet. It is used to store the data of other plugins.

custom

Optional · CustomData

User stored custom fields.

Package: @univerjs/core · Type definitions

你觉得这篇文档如何?

© 2026 DreamNum Co., Ltd.