Bind a Report to an Excel Data Source

<< Click to Display Table of Contents >>

Navigation:  User Interface Reference > Report Designer > Report Designer for WinForms > Create Reports > Binding a Report to Data >

Bind a Report to an Excel Data Source

Interface Elements for Desktop > Report Designer > Report Designer for WinForms > Create Reports > Binding a Report to Data > Bind a Report to an Excel Data Source

This document describes the steps required to connect a report to data obtained from a Microsoft Excel workbook.

To bind a report to an Excel data source, do the following.

1.Create a new report.

2.Click the report's Smart Tag. In the invoked actions list, expand the Data Source drop-down list and click Add New DataSource.

img8330

3.The first page of the invoked Data Source Wizard allows you to specify the data source type. Select Excel File and click Next to proceed.

img122141

4.On the next wizard page, select a required Excel workbook. To do this, click the ellipsis button and locate the source file or enter the full path to this file. The XLS, XLSX and XLSM formats are supported.

img122099

Click Next to proceed to the next wizard page.

5.The next wizard page allows you to specify import settings.

Enable the first check box to use values of the first row as field names. If you disable this option, values of the first row will be imported as data and field names will be generated automatically. You can also specify whether to include empty rows to the result data source, and whether to skip hidden rows and columns.

img122100

Specify required settings and click Next.

6.On the next wizard page specify from which part of the workbook to extract data. All worksheets, tables and named regions existing in the workbook are listed here.

img122101

7.The next wizard page allows you to select required columns and specify their settings.

To select a column, enable the corresponding Selected check box. Use Name to specify the custom column name and Type to choose the column type.

img122102

On this page, you can also preview the resulting data by clicking the Preview... button.

img122103

Click Finish to complete the wizard.

The newly created data source will be displayed in the Components node of the Report Explorer. Additionally, the hierarchy of the data source will be reflected by the Field List.

img122142

Copyright (c) 1998-2016 Developer Express Inc. All rights reserved.

Send Feedback on this topic to DevExpress.