# Workbook Data Structure

- Human documentation: [https://docs.univer.ai/guides/sheets/model/workbook-data](https://docs.univer.ai/guides/sheets/model/workbook-data)

- Agent Markdown: [https://docs.univer.ai/guides/sheets/model/workbook-data.md](https://docs.univer.ai/guides/sheets/model/workbook-data.md)

- Requested language: `en-US`

- Content language: `en-US`

- Documentation version: `1.0.0-rc.0`

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

---

## IWorkbookData

[`IWorkbookData`](https://reference.univer.ai/en-US/interfaces/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

```typescript
const workbookData: IWorkbookData = {
  id: 'unique-workbook-id',
  name: 'My Workbook',
  appVersion: '0.10.2',
  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:

1. [Creating a Univer Sheets using IWorkbookData](https://docs.univer.ai/guides/sheets/features/core/sheets-api.md#create-worksheet)
2. [Saving IWorkbookData from Univer Sheets](https://docs.univer.ai/guides/sheets/features/core/sheets-api.md#get-workbook-data)

`resources` property is used to store plugin data. Go to [Plugin Custom Model](/blog/custom-model)
