New to Telerik UI for WinFormsStart a free 30-day trial

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

Definition

Properties

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

C#
bool CanExport { get; }
Property Value:

The value indicating whether can export.

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

C#
bool CanImport { get; }
Property Value:

The value indicating whether can import.

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

C#
string FilesDescription { get; }
Property Value:

The files description.

Gets the unique identifier name of this format provider.

C#
string Name { get; }
Property Value:

The name of the provider.

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

C#
IEnumerable<string> SupportedExtensions { get; }
Property Value:

The supported extensions.

Methods

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

C#
void Export(Workbook workbook, Stream output, TimeSpan? timeout)
Parameters:workbookWorkbook

The workbook.

outputStream

The output.

timeoutTimeSpan?

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.

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

C#
Workbook Import(Stream input, TimeSpan? timeout)
Parameters:inputStream

The input.

timeoutTimeSpan?

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.