## DetectFileFormat(Stream) {#detectfileformat}

检测并返回有关存储在流中的 excel 格式的信息。

```csharp
public static FileFormatInfo DetectFileFormat(Stream stream)
```

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

### 返回值

一个[`FileFormatInfo`](../../fileformatinfo)包含检测到的信息的对象。

### 也可以看看

* class [FileFormatInfo](../../fileformatinfo)
* class [FileFormatUtil](../../fileformatutil)
* 命名空间 [Aspose.Cells](../../fileformatutil)
* 部件 [Aspose.Cells](../../../)

---

## DetectFileFormat(Stream, string) {#detectfileformat_1}

检测并返回有关存储在流中的 excel 格式的信息。

```csharp
public static FileFormatInfo DetectFileFormat(Stream stream, string password)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| stream | Stream |  |
| password | String | 加密的 ooxml 文件的密码。 |

### 返回值

一个[`FileFormatInfo`](../../fileformatinfo)包含检测到的信息的对象。

### 也可以看看

* class [FileFormatInfo](../../fileformatinfo)
* class [FileFormatUtil](../../fileformatutil)
* 命名空间 [Aspose.Cells](../../fileformatutil)
* 部件 [Aspose.Cells](../../../)

---

## DetectFileFormat(string) {#detectfileformat_2}

检测并返回有关存储在文件中的 Excel 格式的信息。

```csharp
public static FileFormatInfo DetectFileFormat(string filePath)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| filePath | String | 文件路径。 |

### 返回值

一个[`FileFormatInfo`](../../fileformatinfo)包含检测到的信息的对象。

### 也可以看看

* class [FileFormatInfo](../../fileformatinfo)
* class [FileFormatUtil](../../fileformatutil)
* 命名空间 [Aspose.Cells](../../fileformatutil)
* 部件 [Aspose.Cells](../../../)

---

## DetectFileFormat(string, string) {#detectfileformat_3}

检测并返回有关存储在文件中的 Excel 格式的信息。

```csharp
public static FileFormatInfo DetectFileFormat(string filePath, string password)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| filePath | String | 文件路径。 |
| password | String | 加密的 ooxml 文件的密码。 |

### 返回值

一个[`FileFormatInfo`](../../fileformatinfo)包含检测到的信息的对象。

### 也可以看看

* class [FileFormatInfo](../../fileformatinfo)
* class [FileFormatUtil](../../fileformatutil)
* 命名空间 [Aspose.Cells](../../fileformatutil)
* 部件 [Aspose.Cells](../../../)

<!-- DO NOT EDIT: generated by xmldocmd for Aspose.Cells.dll -->
