# IWorkbookData

> Language fallback: requested `zh-CN`; content is `en-US`.

- Human documentation: [https://docs.univer.ai/zh-CN/reference/types/workbook-data](https://docs.univer.ai/zh-CN/reference/types/workbook-data)

- Agent Markdown: [https://docs.univer.ai/zh-CN/reference/types/workbook-data.md](https://docs.univer.ai/zh-CN/reference/types/workbook-data.md)

- Requested language: `zh-CN`

- Content language: `en-US`

- Documentation version: `1.0.0-rc.0`

- Source: [types/workbook-data.mdx](https://github.com/dream-num/documentation/blob/dev/content/reference/types/workbook-data.mdx)

---

A workbook snapshot containing worksheet data, worksheet order, shared styles, and plugin resources. [`FWorkbook.save`](https://docs.univer.ai/zh-CN/reference/facade/workbook.md#save) returns this structure. Editing the returned snapshot does not update the live workbook; use the Facade methods to edit it.

## Import

```ts
import type { IWorkbookData } from '@univerjs/core'
```

## Definition

```ts
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 `IWorksheetData`s 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.

## Related types

* [`LocaleType`](https://docs.univer.ai/zh-CN/reference/enums/locale-type.md)
* [`DateSystem`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/types/enum/date-system.d.ts)
* [`Nullable`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/shared/types.d.ts)
* [`IStyleData`](https://docs.univer.ai/zh-CN/reference/types/style-data.md)
* [`Record`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts)
* [`Partial`](https://unpkg.com/@typescript/typescript-darwin-arm64@7.0.2/lib/lib.es5.d.ts)
* [`IWorksheetData`](https://docs.univer.ai/zh-CN/reference/types/worksheet-data.md)
* [`IResources`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/services/resource-manager/type.d.ts)
* [`CustomData`](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/sheets/typedef.d.ts)

**Package:** [`@univerjs/core`](https://docs.univer.ai/zh-CN/reference/packages/plugins/univerjs/core.md) · [Type definitions](https://unpkg.com/@univerjs/core@1.0.0-rc.0/lib/types/sheets/typedef.d.ts)
