# LegacySpreadsheetImporter

Detects and imports selected legacy spreadsheets without executing macros or resolving external links.

Class 

`OfficeIMO.Excel.Legacy`

**Namespace**

`OfficeIMO.Excel.Legacy`

**Assembly**

`OfficeIMO.Excel`

**Source revision**

`12511d2fa560` with working tree changes

**Source**

[LegacySpreadsheetImporter.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/12511d2fa560784a40564a2dc62102d2005ed547/OfficeIMO.Excel/Legacy/LegacySpreadsheetImporter.cs#L20)

**Modifiers**

static

Detects and imports selected legacy spreadsheets without executing macros or resolving external links.

## Inheritance

- object
- LegacySpreadsheetImporter

Filter members 

Show inherited

## Methods

Detect 3 overloads

`public static LegacySpreadsheetDetection Detect(string path, LegacySpreadsheetImportOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-detect-string-officeimo-excel-legacy-legacyspreadsheetimportoptions-threading-cancellationtoken)

[LegacySpreadsheetImporter.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/12511d2fa560784a40564a2dc62102d2005ed547/OfficeIMO.Excel/Legacy/LegacySpreadsheetImporter.cs#L20)

Detects a legacy spreadsheet file.

Parameters

**path string required**

**options OfficeIMO.Excel.Legacy.LegacySpreadsheetImportOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`LegacySpreadsheetDetection`

`public static LegacySpreadsheetDetection Detect(Stream stream, LegacySpreadsheetImportOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-detect-io-stream-officeimo-excel-legacy-legacyspreadsheetimportoptions-threading-cancellationtoken)

[LegacySpreadsheetImporter.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/12511d2fa560784a40564a2dc62102d2005ed547/OfficeIMO.Excel/Legacy/LegacySpreadsheetImporter.cs#L26)

Detects a legacy spreadsheet stream.

Parameters

**stream System.IO.Stream required**

**options OfficeIMO.Excel.Legacy.LegacySpreadsheetImportOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`LegacySpreadsheetDetection`

`public static LegacySpreadsheetDetection Detect(byte[] data, LegacySpreadsheetImportOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-detect-byte-officeimo-excel-legacy-legacyspreadsheetimportoptions-threading-cancellationtoken)

[LegacySpreadsheetImporter.cs:32](https://github.com/EvotecIT/OfficeIMO/blob/12511d2fa560784a40564a2dc62102d2005ed547/OfficeIMO.Excel/Legacy/LegacySpreadsheetImporter.cs#L32)

Detects legacy spreadsheet bytes.

Parameters

**data byte[] required**

**options OfficeIMO.Excel.Legacy.LegacySpreadsheetImportOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`LegacySpreadsheetDetection`

Import 3 overloads

`public static LegacySpreadsheetImportResult Import(string path, LegacySpreadsheetImportOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-import-string-officeimo-excel-legacy-legacyspreadsheetimportoptions-threading-cancellationtoken)

[LegacySpreadsheetImporter.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/12511d2fa560784a40564a2dc62102d2005ed547/OfficeIMO.Excel/Legacy/LegacySpreadsheetImporter.cs#L41)

Imports a legacy spreadsheet file into a normal editable [ExcelDocument](/api/excel/officeimo-excel-exceldocument/).

Parameters

**path string required**

**options OfficeIMO.Excel.Legacy.LegacySpreadsheetImportOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`LegacySpreadsheetImportResult`

`public static LegacySpreadsheetImportResult Import(Stream stream, LegacySpreadsheetImportOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-import-io-stream-officeimo-excel-legacy-legacyspreadsheetimportoptions-threading-cancellationtoken)

[LegacySpreadsheetImporter.cs:47](https://github.com/EvotecIT/OfficeIMO/blob/12511d2fa560784a40564a2dc62102d2005ed547/OfficeIMO.Excel/Legacy/LegacySpreadsheetImporter.cs#L47)

Imports a legacy spreadsheet stream into a normal editable [ExcelDocument](/api/excel/officeimo-excel-exceldocument/).

Parameters

**stream System.IO.Stream required**

**options OfficeIMO.Excel.Legacy.LegacySpreadsheetImportOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`LegacySpreadsheetImportResult`

`public static LegacySpreadsheetImportResult Import(byte[] data, LegacySpreadsheetImportOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-import-byte-officeimo-excel-legacy-legacyspreadsheetimportoptions-threading-cancellationtoken)

[LegacySpreadsheetImporter.cs:53](https://github.com/EvotecIT/OfficeIMO/blob/12511d2fa560784a40564a2dc62102d2005ed547/OfficeIMO.Excel/Legacy/LegacySpreadsheetImporter.cs#L53)

Imports legacy spreadsheet bytes into a normal editable [ExcelDocument](/api/excel/officeimo-excel-exceldocument/).

Parameters

**data byte[] required**

**options OfficeIMO.Excel.Legacy.LegacySpreadsheetImportOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`LegacySpreadsheetImportResult`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

<!-- PowerForge markdown artifact sha256:29F53741D847DADF9B6A2AFA1B6D61B360806BC11796BAC260C2ECB981D685FD -->
