## Save(string) {#save_3}

将 OneNote 文档保存到文件中。

```csharp
public void Save(string fileName)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| fileName | String | 文件的全名。如果具有指定全名的文件已经存在，则覆盖现有文件。 |

### 例外

| 例外 | （健康）状况 |
| --- | --- |
| [IncorrectDocumentStructureException](../../incorrectdocumentstructureexception/) | 文档结构违反规范。 |
| [UnsupportedSaveFormatException](../../unsupportedsaveformatexception/) | 不支持请求的保存格式。 |

### 也可以看看

* class [Notebook](../)
* 命名空间 [Aspose.Note](../../notebook/)
* 部件 [Aspose.Note](../../../)

---

## Save(Stream) {#save}

将 OneNote 文档保存到流中。

```csharp
public void Save(Stream stream)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| stream | Stream | 流. |

### 例外

| 例外 | （健康）状况 |
| --- | --- |
| [IncorrectDocumentStructureException](../../incorrectdocumentstructureexception/) | 文档结构违反规范。 |
| [UnsupportedSaveFormatException](../../unsupportedsaveformatexception/) | 不支持请求的保存格式。 |

### 也可以看看

* class [Notebook](../)
* 命名空间 [Aspose.Note](../../notebook/)
* 部件 [Aspose.Note](../../../)

---

## Save(string, SaveFormat) {#save_4}

将 OneNote 文档保存为指定格式的文件。

```csharp
public void Save(string fileName, SaveFormat format)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| fileName | String | 文件的全名。如果具有指定全名的文件已经存在，则覆盖现有文件。 |
| format | SaveFormat | 保存文档的格式。 |

### 例外

| 例外 | （健康）状况 |
| --- | --- |
| [IncorrectDocumentStructureException](../../incorrectdocumentstructureexception/) | 文档结构违反规范。 |
| [UnsupportedSaveFormatException](../../unsupportedsaveformatexception/) | 不支持请求的保存格式。 |

### 也可以看看

* enum [SaveFormat](../../saveformat/)
* class [Notebook](../)
* 命名空间 [Aspose.Note](../../notebook/)
* 部件 [Aspose.Note](../../../)

---

## Save(Stream, SaveFormat) {#save_1}

以指定格式将 OneNote 文档保存到流中。

```csharp
public void Save(Stream stream, SaveFormat format)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| stream | Stream | 流. |
| format | SaveFormat | 保存文档的格式。 |

### 例外

| 例外 | （健康）状况 |
| --- | --- |
| [IncorrectDocumentStructureException](../../incorrectdocumentstructureexception/) | 文档结构违反规范。 |
| [UnsupportedSaveFormatException](../../unsupportedsaveformatexception/) | 不支持请求的保存格式。 |

### 也可以看看

* enum [SaveFormat](../../saveformat/)
* class [Notebook](../)
* 命名空间 [Aspose.Note](../../notebook/)
* 部件 [Aspose.Note](../../../)

---

## Save(string, NotebookSaveOptions) {#save_5}

使用指定的保存选项将 OneNote 文档保存到文件。

```csharp
public void Save(string fileName, NotebookSaveOptions options)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| fileName | String | 文件的全名。如果具有指定全名的文件已经存在，则覆盖现有文件。 |
| options | NotebookSaveOptions | 指定文档如何保存在文件中的选项。 |

### 例外

| 例外 | （健康）状况 |
| --- | --- |
| [IncorrectDocumentStructureException](../../incorrectdocumentstructureexception/) | 文档结构违反规范。 |
| [UnsupportedSaveFormatException](../../unsupportedsaveformatexception/) | 不支持请求的保存格式。 |

### 也可以看看

* class [NotebookSaveOptions](../../../aspose.note.saving/notebooksaveoptions/)
* class [Notebook](../)
* 命名空间 [Aspose.Note](../../notebook/)
* 部件 [Aspose.Note](../../../)

---

## Save(Stream, NotebookSaveOptions) {#save_2}

使用指定的保存选项将 OneNote 文档保存到流中。

```csharp
public void Save(Stream stream, NotebookSaveOptions options)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| stream | Stream | 流. |
| options | NotebookSaveOptions | 指定如何保存文档的选项。 |

### 例外

| 例外 | （健康）状况 |
| --- | --- |
| [IncorrectDocumentStructureException](../../incorrectdocumentstructureexception/) | 文档结构违反规范。 |
| [UnsupportedSaveFormatException](../../unsupportedsaveformatexception/) | 不支持请求的保存格式。 |

### 也可以看看

* class [NotebookSaveOptions](../../../aspose.note.saving/notebooksaveoptions/)
* class [Notebook](../)
* 命名空间 [Aspose.Note](../../notebook/)
* 部件 [Aspose.Note](../../../)


