New to Telerik Document ProcessingStart a free 30-day trial

Base class for format providers that import and export workbooks using binary formats such as XLSX and XLS.

Definition

Constructors

Initializes a new instance of the BinaryWorkbookFormatProviderBase class.

C#
protected BinaryWorkbookFormatProviderBase()

Methods

Exports the specified workbook to a byte array with optional timeout to prevent long-running operations.

C#
public byte[] Export(Workbook workbook, TimeSpan? timeout)
Parameters:workbookWorkbook

The workbook.

timeoutTimeSpan?

The timeout after which the operation will be cancelled.

Returns:

byte[]

The result byte array.

Exceptions:

ArgumentOutOfRangeException

The exception that is thrown when timeout is less than -1 or greater than Int32.MaxValue. Note that this upper bound is more restrictive than TimeSpan.MaxValue.

Implements: IBinaryWorkbookFormatProvider.Export(Workbook, TimeSpan?)

Imports a workbook from the specified byte array with optional timeout to prevent long-running operations.

C#
public Workbook Import(byte[] input, TimeSpan? timeout)
Parameters:inputbyte[]

The input.

timeoutTimeSpan?

The timeout after which the operation will be cancelled.

Returns:

Workbook

The workbook.

Exceptions:

ArgumentOutOfRangeException

The exception that is thrown when timeout is less than -1 or greater than Int32.MaxValue. Note that this upper bound is more restrictive than TimeSpan.MaxValue.

Implements: IBinaryWorkbookFormatProvider.Import(byte[], TimeSpan?)