OpenXmlExcelWorkerProvider

Ecng.Excel

The IExcelWorkerProvider implementation based on Open XML SDK. It can open and modify an existing XLSX template (keeping styles, charts, conditional formatting), and only inject new values into cells.

Реализует: IExcelWorkerProvider

Методы

CreateNew
public IExcelWorker CreateNew(Stream stream, bool readOnly)
result = openXmlExcelWorkerProvider.CreateNew(stream, readOnly)

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

stream
The stream to write the new workbook to.
readOnly
If true, the workbook is opened in read-only mode; otherwise, it is writable.

Возвращает: An IExcelWorker instance for the new workbook.

OpenExist
public IExcelWorker OpenExist(Stream stream)
result = openXmlExcelWorkerProvider.OpenExist(stream)

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

stream
The stream containing the existing workbook data.

Возвращает: An IExcelWorker instance for the opened workbook.