Class
BinaryWorkbookFormatProviderBase

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

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.FormatProviders

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public abstract class BinaryWorkbookFormatProviderBase : WorkbookFormatProviderBase, IBinaryWorkbookFormatProvider, IWorkbookFormatProvider

Inheritance: objectWorkbookFormatProviderBaseBinaryWorkbookFormatProviderBase

Derived Classes: XlsmFormatProviderXlsxFormatProviderPdfFormatProvider

Implements: IBinaryWorkbookFormatProviderIWorkbookFormatProvider

Inherited Members WorkbookFormatProviderBase.Import(Stream)WorkbookFormatProviderBase.Import(Stream, TimeSpan?)WorkbookFormatProviderBase.ImportOverride(Stream)WorkbookFormatProviderBase.ImportOverride(Stream, CancellationToken)WorkbookFormatProviderBase.Export(Workbook, Stream)WorkbookFormatProviderBase.Export(Workbook, Stream, TimeSpan?)WorkbookFormatProviderBase.ExportOverride(Workbook, Stream)WorkbookFormatProviderBase.ExportOverride(Workbook, Stream, CancellationToken)WorkbookFormatProviderBase.NameWorkbookFormatProviderBase.FilesDescriptionWorkbookFormatProviderBase.SupportedExtensionsWorkbookFormatProviderBase.CanImportWorkbookFormatProviderBase.CanExport

Constructors

BinaryWorkbookFormatProviderBase()

Initializes a new instance of the BinaryWorkbookFormatProviderBase class.

Declaration

cs-api-definition
protected BinaryWorkbookFormatProviderBase()

Methods

Export(Workbook)

Exports the specified workbook to a byte array without timeout support.

Declaration

cs-api-definition
[Obsolete("This method is obsolete. Please use Export(Workbook workbook, TimeSpan? timeout) instead.")]
public byte[] Export(Workbook workbook)

Parameters

workbook

Workbook

The workbook.

Returns

byte[]

The result byte array.

Implements IBinaryWorkbookFormatProvider.Export(Workbook)

Export(Workbook, TimeSpan?)

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

Declaration

cs-api-definition
public byte[] Export(Workbook workbook, TimeSpan? timeout)

Parameters

workbook

Workbook

The workbook.

timeout

TimeSpan?

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.

Import(byte[])

Imports a workbook from the specified byte array without timeout support.

Declaration

cs-api-definition
[Obsolete("This method is obsolete. Please use Import(byte[] input, TimeSpan? timeout) instead.")]
public Workbook Import(byte[] input)

Parameters

input

byte[]

The input.

Returns

Workbook

The workbook.

Implements IBinaryWorkbookFormatProvider.Import(byte[])

Import(byte[], TimeSpan?)

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

Declaration

cs-api-definition
public Workbook Import(byte[] input, TimeSpan? timeout)

Parameters

input

byte[]

The input.

timeout

TimeSpan?

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.