Class
XlsFormatProvider

Imports and exports workbooks in XLS (Excel 97-2003 BIFF8) format by converting through XLSX for compatibility.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.FormatProviders.Xls

Assembly:Telerik.Windows.Documents.Spreadsheet.FormatProviders.Xls.dll

Syntax:

cs-api-definition
public class XlsFormatProvider : BinaryWorkbookFormatProviderBase, IBinaryWorkbookFormatProvider, IWorkbookFormatProvider

Inheritance: objectWorkbookFormatProviderBaseBinaryWorkbookFormatProviderBaseXlsFormatProvider

Implements: IBinaryWorkbookFormatProviderIWorkbookFormatProvider

Inherited Members BinaryWorkbookFormatProviderBase.Import(byte[])BinaryWorkbookFormatProviderBase.Import(byte[], TimeSpan?)BinaryWorkbookFormatProviderBase.Export(Workbook)BinaryWorkbookFormatProviderBase.Export(Workbook, TimeSpan?)WorkbookFormatProviderBase.Import(Stream)WorkbookFormatProviderBase.Import(Stream, TimeSpan?)WorkbookFormatProviderBase.Export(Workbook, Stream)WorkbookFormatProviderBase.Export(Workbook, Stream, TimeSpan?)

Constructors

XlsFormatProvider()

Initializes a new instance of the XlsFormatProvider class.

Declaration

cs-api-definition
public XlsFormatProvider()

Properties

CanExport

Indicates that this provider supports exporting workbooks to XLS format.

Declaration

cs-api-definition
public override bool CanExport { get; }

Property Value

bool

The value indicating whether can export.

Overrides WorkbookFormatProviderBase.CanExport

CanImport

Indicates that this provider supports importing XLS files into workbooks.

Declaration

cs-api-definition
public override bool CanImport { get; }

Property Value

bool

The value indicating whether can import.

Overrides WorkbookFormatProviderBase.CanImport

FilesDescription

Describes the file type as "Excel 97-2003 Workbook" for display in UI contexts.

Declaration

cs-api-definition
public override string FilesDescription { get; }

Property Value

string

The files description.

Overrides WorkbookFormatProviderBase.FilesDescription

Name

Identifies this format provider as "XlsFormatProvider" for registration and lookup.

Declaration

cs-api-definition
public override string Name { get; }

Property Value

string

The name of the provider.

Overrides WorkbookFormatProviderBase.Name

SupportedExtensions

Specifies that this provider handles files with .xls extension.

Declaration

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

Property Value

IEnumerable<string>

The supported extensions.

Overrides WorkbookFormatProviderBase.SupportedExtensions

Methods

ExportOverride(Workbook, Stream)

Exports the specified workbook.

Declaration

cs-api-definition
[Obsolete("This method is obsolete. Please use ExportOverride(Workbook workbook, Stream output, CancellationToken cancellationToken) instead.")]
protected override void ExportOverride(Workbook workbook, Stream output)

Parameters

workbook

Workbook

The workbook.

output

Stream

The output.

Overrides WorkbookFormatProviderBase.ExportOverride(Workbook, Stream)

ExportOverride(Workbook, Stream, CancellationToken)

Writes the workbook to the stream in XLS format by exporting to XLSX first, then converting to BIFF8 for compatibility.

Declaration

cs-api-definition
protected override void ExportOverride(Workbook workbook, Stream output, CancellationToken cancellationToken)

Parameters

workbook

Workbook

The workbook.

output

Stream

The output.

cancellationToken

CancellationToken

The cancellation token used to cancel the operation.

Overrides WorkbookFormatProviderBase.ExportOverride(Workbook, Stream, CancellationToken)

ImportOverride(Stream)

Imports the specified input.

Declaration

cs-api-definition
[Obsolete("This method is obsolete. Please use ImportOverride(Stream input, CancellationToken cancellationToken) instead.")]
protected override Workbook ImportOverride(Stream input)

Parameters

input

Stream

The input.

Returns

Workbook

The imported workbook.

Overrides WorkbookFormatProviderBase.ImportOverride(Stream)

ImportOverride(Stream, CancellationToken)

Reads XLS data from the stream by converting BIFF8 format to XLSX internally, then importing as XLSX for compatibility.

Declaration

cs-api-definition
protected override Workbook ImportOverride(Stream input, CancellationToken cancellationToken)

Parameters

input

Stream

The input.

cancellationToken

CancellationToken

The cancellation token used to cancel the operation.

Returns

Workbook

The imported workbook.

Overrides WorkbookFormatProviderBase.ImportOverride(Stream, CancellationToken)