# 가져오기 및 내보내기

- Human documentation: [https://docs.univer.ai/ko-KR/guides/boards/features/import-export](https://docs.univer.ai/ko-KR/guides/boards/features/import-export)

- Agent Markdown: [https://docs.univer.ai/ko-KR/guides/boards/features/import-export.md](https://docs.univer.ai/ko-KR/guides/boards/features/import-export.md)

- Requested language: `ko-KR`

- Content language: `ko-KR`

- Documentation version: `1.0.4`

- Source: [boards/features/import-export.ko-KR.mdx](https://github.com/dream-num/documentation/blob/dev/content/guides/boards/features/import-export.ko-KR.mdx)

---

#### Package metadata

```json
{
  "preset": [],
  "plugins": [
    {
      "client": "@univerjs-pro/exchange-client",
      "locale": "@univerjs-pro/exchange-client/locale/ko-KR",
      "style": "@univerjs-pro/exchange-client/lib/index.css",
      "facade": "@univerjs-pro/exchange-client/facade"
    },
    {
      "client": "@univerjs-pro/boards-exchange-client",
      "locale": "@univerjs-pro/boards-exchange-client/locale/ko-KR",
      "style": "@univerjs-pro/boards-exchange-client/lib/index.css",
      "facade": "@univerjs-pro/boards-exchange-client/facade"
    }
  ],
  "license": true,
  "server": true
}
```

`@univerjs-pro/boards-exchange-client`는 Mermaid 소스 가져오기와 PPTX 파일 내보내기를 지원합니다.

## 지원 형식

아래 표는 이 페이지의 브라우저 API가 지원하는 형식입니다. Office 파일 변환에는 해당 문서 유형과 형식을 지원하는 백엔드가 필요합니다.

| 가져오기           | 내보내기    |
| -------------- | ------- |
| Mermaid 소스 텍스트 | `.pptx` |

## 먼저 보드 런타임 등록하기

```ts
univer.registerPlugin(UniverBoardsPlugin)
univer.registerPlugin(UniverBoardsUIPlugin)
univer.registerPlugin(UniverBoardsExchangeClientPlugin)
```

해당 요소가 포함될 수 있는 데이터를 가져오기 전에 선택적 요소 플러그인을 등록하세요.

```ts
univer.registerPlugin(UniverBoardsTablePlugin)
univer.registerPlugin(UniverBoardsTableUIPlugin)
univer.registerPlugin(UniverBoardsMindPlugin)
univer.registerPlugin(UniverBoardsMindUIPlugin)
```

## 스냅샷 전달

애플리케이션 수준에서 데이터를 영구적으로 유지하려면 보드 스냅샷을 저장하고 복원하세요.

```ts
const board = univerAPI.getActiveBoard()
const snapshot = board.getData()

univer.createUnit(UniverInstanceType.UNIVER_BOARD, snapshot)
```

## Facade 내보내기와 Mermaid 가져오기

```ts
import '@univerjs-pro/exchange-client/facade'
import '@univerjs-pro/boards-exchange-client/facade'

const file = await univerAPI.exportBoardByUnitIdAsync(board.getId())
if (file) univerAPI.downloadFile(file, 'board', 'pptx')
await board.insertMermaidAsync('flowchart LR\n  A[초안] --> B[검토]')
```

PPTX 내보내기는 [Univer Server SDK](https://docs.univer.ai/ko-KR/server/import-export.md)로 변환 백엔드를 통합하고 Board 스냅샷 지원을 확인해야 합니다. [클라이언트 라이선스](https://docs.univer.ai/ko-KR/server/license.md)는 별도로 설정합니다. 브라우저 플러그인 등록만으로 변환 API가 제공되지는 않습니다.
