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.
Namespace: Telerik.Windows.Documents.Spreadsheet.FormatProviders
Assembly: Telerik.Windows.Documents.Spreadsheet.dll
Syntax
public interface IWorkbookFormatProvider
Properties
CanExport
Gets a value indicating whether this provider supports exporting workbooks to streams.
Declaration
bool CanExport { get; }
Property Value
|
System.Boolean
The value indicating whether can export. |
CanImport
Gets a value indicating whether this provider supports importing workbooks from streams.
Declaration
bool CanImport { get; }
Property Value
|
System.Boolean
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
string FilesDescription { get; }
Property Value
|
System.String
The files description. |
Name
Gets the unique identifier name of this format provider.
Declaration
string Name { get; }
Property Value
|
System.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
IEnumerable<string> SupportedExtensions { get; }
Property Value
|
System.Collections.Generic.IEnumerable<System.String>
The supported extensions. |
Methods
Export(Workbook, Stream)
Exports the specified workbook to the output stream in the provider's format.
Declaration
[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. |
|
System.IO.Stream
output
The output. |
Export(Workbook, Stream, Nullable<TimeSpan>)
Exports the specified workbook to the output stream with an optional timeout in the provider's format.
Declaration
void Export(Workbook workbook, Stream output, TimeSpan? timeout)
Parameters
|
Workbook
workbook
The workbook. |
|
System.IO.Stream
output
The output. |
|
System.Nullable<System.TimeSpan>
timeout
The timeout after which the operation will be cancelled. |
Exceptions
|
System.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
[Obsolete("This method is obsolete. Please use Import(Stream input, TimeSpan? timeout) instead.")]
Workbook Import(Stream input)
Parameters
|
System.IO.Stream
input
The input. |
Returns
|
Workbook
The imported workbook. |
Import(Stream, Nullable<TimeSpan>)
Imports a workbook from the specified stream with an optional timeout and returns the deserialized workbook instance.
Declaration
Workbook Import(Stream input, TimeSpan? timeout)
Parameters
|
System.IO.Stream
input
The input. |
|
System.Nullable<System.TimeSpan>
timeout
The timeout after which the operation will be cancelled. |
Returns
|
Workbook
The imported workbook. |
Exceptions
|
System.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. |