Skip to main content

ExcelSchemaProvider.GetSchema(String, Stream, ExcelDocumentFormat, ExcelSourceOptionsBase, CancellationToken) Method

Returns a schema for a specified Excel/CSV file.

Namespace: DevExpress.DataAccess.Excel

Assembly: DevExpress.DataAccess.v22.2.dll

NuGet Package: DevExpress.DataAccess


public FieldInfo[] GetSchema(
    string fileName,
    Stream stream,
    ExcelDocumentFormat format,
    ExcelSourceOptionsBase optionsBase,
    CancellationToken token


Name Type Description
fileName String

A String value specifying the name of the source Excel/CSV file.

stream Stream

A Stream object.

format ExcelDocumentFormat

An ExcelDocumentFormat enumeration value specifying the format of the source file.

optionsBase ExcelSourceOptionsBase

An ExcelSourceOptionsBase descendant specifying options used to extract data from Microsoft Excel workbooks (XLS, XLSX or XLSM files) or CSV files.

token CancellationToken

A CancellationToken structure that propogates notification that operations should be canceled.


Type Description

An array of FieldInfo objects.

See Also