Interface
IWorkbookFormatProvider

Defines a common interface for workbook import and export format providers, enabling serialization and deserialization of workbooks to and from various file formats.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.FormatProviders

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public interface IWorkbookFormatProvider

Properties

CanExport

Gets a value indicating whether this provider supports exporting workbooks to streams.

Declaration

cs-api-definition
bool CanExport { get; }

Property Value

bool

The value indicating whether can export.

CanImport

Gets a value indicating whether this provider supports importing workbooks from streams.

Declaration

cs-api-definition
bool CanImport { get; }

Property Value

bool

The value indicating whether can import.

FilesDescription

Gets the human-readable description of files supported by this provider, suitable for display in file dialogs.

Declaration

cs-api-definition
string FilesDescription { get; }

Property Value

string

The files description.

Name

Gets the unique identifier name of this format provider.

Declaration

cs-api-definition
string Name { get; }

Property Value

string

The name of the provider.

SupportedExtensions

Gets the collection of file extensions supported by this provider, each including the leading dot (e.g., ".xlsx").

Declaration

cs-api-definition
IEnumerable<string> SupportedExtensions { get; }

Property Value

IEnumerable<string>

The supported extensions.

Methods

Export(Workbook, Stream)

Exports the specified workbook to the output stream in the provider's format.

Declaration

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

Parameters

workbook

Workbook

The workbook.

output

Stream

The output.

Export(Workbook, Stream, TimeSpan?)

Exports the specified workbook to the output stream with an optional timeout in the provider's format.

Declaration

cs-api-definition
void Export(Workbook workbook, Stream output, TimeSpan? timeout)

Parameters

workbook

Workbook

The workbook.

output

Stream

The output.

timeout

TimeSpan?

The timeout after which the operation will be cancelled.

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(Stream)

Imports a workbook from the specified stream and returns the deserialized workbook instance.

Declaration

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

Parameters

input

Stream

The input.

Returns

Workbook

The imported workbook.

Import(Stream, TimeSpan?)

Imports a workbook from the specified stream with an optional timeout and returns the deserialized workbook instance.

Declaration

cs-api-definition
Workbook Import(Stream input, TimeSpan? timeout)

Parameters

input

Stream

The input.

timeout

TimeSpan?

The timeout after which the operation will be cancelled.

Returns

Workbook

The imported 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.