New to Telerik Document ProcessingStart a free 30-day trial

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:

C#
public class XlsFormatProvider : BinaryWorkbookFormatProviderBase, IBinaryWorkbookFormatProvider, IWorkbookFormatProvider

Inheritance: objectWorkbookFormatProviderBaseBinaryWorkbookFormatProviderBaseXlsFormatProvider

Implements: IBinaryWorkbookFormatProviderIWorkbookFormatProvider

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

Constructors

Initializes a new instance of the XlsFormatProvider class.

C#
public XlsFormatProvider()

Methods

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

C#
protected override void ExportOverride(Workbook workbook, Stream output, CancellationToken cancellationToken)
Parameters:workbookWorkbook

The workbook.

outputStream

The output.

cancellationTokenCancellationToken

The cancellation token used to cancel the operation.

Overrides: WorkbookFormatProviderBase.ExportOverride(Workbook, Stream, CancellationToken)

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

C#
protected override Workbook ImportOverride(Stream input, CancellationToken cancellationToken)
Parameters:inputStream

The input.

cancellationTokenCancellationToken

The cancellation token used to cancel the operation.

Returns:

Workbook

The imported workbook.

Overrides: WorkbookFormatProviderBase.ImportOverride(Stream, CancellationToken)

Properties

Indicates that this provider supports exporting workbooks to XLS format.

C#
public override bool CanExport { get; }
Property Value:

The value indicating whether can export.

Overrides: WorkbookFormatProviderBase.CanExport

Indicates that this provider supports importing XLS files into workbooks.

C#
public override bool CanImport { get; }
Property Value:

The value indicating whether can import.

Overrides: WorkbookFormatProviderBase.CanImport

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

C#
public override string FilesDescription { get; }
Property Value:

The files description.

Overrides: WorkbookFormatProviderBase.FilesDescription

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

C#
public override string Name { get; }
Property Value:

The name of the provider.

Overrides: WorkbookFormatProviderBase.Name

Specifies that this provider handles files with .xls extension.

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

The supported extensions.

Overrides: WorkbookFormatProviderBase.SupportedExtensions