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

Returns a schema for a specified Excel/CSV file.

Namespace: DevExpress.DataAccess.Excel

Assembly: DevExpress.DataAccess.v20.1.dll

Declaration

public FieldInfo[] GetSchema(
    string fileName,
    Stream stream,
    ExcelDocumentFormat format,
    ExcelSourceOptionsBase optionsBase,
    CancellationToken token
)
Public Function GetSchema(
    fileName As String,
    stream As Stream,
    format As ExcelDocumentFormat,
    optionsBase As ExcelSourceOptionsBase,
    token As CancellationToken
) As FieldInfo()

Parameters

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.

Returns

Type Description
FieldInfo[]

An array of FieldInfo objects.

See Also