New to Telerik Document ProcessingStart a free 30-day trial

Base class for text-based workbook format providers that offer string-based import and export methods in addition to stream-based operations.

Definition

Constructors

Initializes a new instance of the TextBasedWorkbookFormatProviderBase class.

C#
protected TextBasedWorkbookFormatProviderBase()

Methods

Exports the specified workbook to a text string with an optional timeout in the provider's format and returns the serialized result.

C#
public string Export(Workbook workbook, TimeSpan? timeout)
Parameters:workbookWorkbook

The workbook.

timeoutTimeSpan?

The timeout after which the operation will be cancelled.

Returns:

string

The result string.

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: ITextBasedWorkbookFormatProvider.Export(Workbook, TimeSpan?)

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

C#
public Workbook Import(string input, TimeSpan? timeout)
Parameters:inputstring

The input.

timeoutTimeSpan?

The timeout after which the operation will be cancelled.

Returns:

Workbook

The result 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: ITextBasedWorkbookFormatProvider.Import(string, TimeSpan?)