corelibraries-devexpress-dot-dataaccess-dot-excel-dot-exceldatasource-0a3d61b2.md
Provides the capability to change options used to extract data from Microsoft Excel workbooks (XLS, XLSX or XLSM files) or CSV files.
Namespace : DevExpress.DataAccess.Excel
Assembly : DevExpress.DataAccess.v25.2.dll
NuGet Package : DevExpress.DataAccess
public event EventHandler<BeforeFillEventArgs> BeforeFill
Public Event BeforeFill As EventHandler(Of BeforeFillEventArgs)
The BeforeFill event's data class is BeforeFillEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| FileName | Gets or sets a path to the Microsoft Excel workbook or CSV file. |
| SourceOptions | Gets or sets options used to extract data from Microsoft Excel workbooks (XLS, XLSX or XLSM files) or CSV files. |
| Stream | Gets or sets a stream that contains a Microsoft Excel workbook or CSV file. |
| StreamDocumentFormat | Gets or sets the format of the document contained in the BeforeFillEventArgs.Stream. |
The BeforeFill event provides the capability to change settings related to loading the Microsoft Excel workbook (XLS, XLSX or XLSM files) or CSV file. For instance, you can specify a new file path (BeforeFillEventArgs.FileName) or change options used to extract data (BeforeFillEventArgs.SourceOptions).
See Also