Back to Devexpress

DashboardConfigurator.ExcelDataSourceBeforeFill Event

dashboard-devexpress-dot-dashboardweb-dot-dashboardconfigurator-7c02ad77.md

latest5.7 KB
Original Source

DashboardConfigurator.ExcelDataSourceBeforeFill Event

Provides the capability to change options used to extract data from Microsoft Excel workbooks (XLS, XLSX or XLSM files) or CSV files.

Namespace : DevExpress.DashboardWeb

Assembly : DevExpress.Dashboard.v25.2.Web.dll

NuGet Package : DevExpress.Web.Dashboard.Common

Declaration

csharp
public event ExcelDataSourceBeforeFillWebEventHandler ExcelDataSourceBeforeFill
vb
Public Event ExcelDataSourceBeforeFill As ExcelDataSourceBeforeFillWebEventHandler

Event Data

The ExcelDataSourceBeforeFill event's data class is ExcelDataSourceBeforeFillWebEventArgs. The following properties provide information specific to this event:

PropertyDescription
DashboardIdGets the identifier of the dashboard for which the event was raised.
DataSourceComponentNameGets the component name of the Excel data source for which the event was raised. Inherited from DashboardExcelDataSourceBeforeFillEventArgs.
DataSourceConnectionNameInherited from DashboardExcelDataSourceBeforeFillEventArgs.
DataSourceNameInherited from DashboardExcelDataSourceBeforeFillEventArgs.
FileNameGets or sets a path to the Microsoft Excel workbook or CSV file. Inherited from DashboardExcelDataSourceBeforeFillEventArgs.
SourceOptionsGets or sets options used to extract data from Microsoft Excel workbooks (XLS, XLSX or XLSM files) or CSV files. Inherited from DashboardExcelDataSourceBeforeFillEventArgs.
StreamInherited from DashboardExcelDataSourceBeforeFillEventArgs.
StreamDocumentFormatInherited from DashboardExcelDataSourceBeforeFillEventArgs.

Remarks

Tip

For information on how to use the DashboardConfigurator‘s API, see the following topic: Server-Side API Overview.

The ExcelDataSourceBeforeFill event is raised for dashboards supplied with data using DashboardExcelDataSource and 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 (DashboardExcelDataSourceBeforeFillEventArgs.FileName) or change options used to extract data (DashboardExcelDataSourceBeforeFillEventArgs.SourceOptions).

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ExcelDataSourceBeforeFill event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

mvc-dashboard-obtain-data-from-online-spreadsheets/CS/MvcDashboard/App_Start/DashboardConfig.cs#L46

csharp
DashboardConfigurator.Default.SetDataSourceStorage(DataSourceStorage);
DashboardConfigurator.Default.ExcelDataSourceBeforeFill += DefaultOnExcelDataSourceBeforeFill;
DashboardConfigurator.Default.ConfigureDataReloadingTimeout += (s, e) => {

See Also

DashboardConfigurator Class

DashboardConfigurator Members

DevExpress.DashboardWeb Namespace