Table of Contents

Interface IExcelWorkerProvider

Namespace
Ecng.Interop
Assembly
Ecng.Interop.dll

Defines a contract for creating and opening Excel worker instances from streams.

public interface IExcelWorkerProvider
Extension Methods

Methods

CreateNew(Stream, bool)

Creates a new Excel workbook and returns an IExcelWorker instance to interact with it.

IExcelWorker CreateNew(Stream stream, bool readOnly = false)

Parameters

stream Stream

The stream to write the new workbook to.

readOnly bool

If true, the workbook is opened in read-only mode; otherwise, it is writable.

Returns

IExcelWorker

An IExcelWorker instance for the new workbook.

OpenExist(Stream)

Opens an existing Excel workbook from a stream and returns an IExcelWorker instance to interact with it.

IExcelWorker OpenExist(Stream stream)

Parameters

stream Stream

The stream containing the existing workbook data.

Returns

IExcelWorker

An IExcelWorker instance for the opened workbook.