Excel Datasource

A Excel datasource is a datasource that allows data to be accessed directly from the Excel file.

To use the DataSource Wizard, right-click on the folder where the Excel datasource is to be created. The list of available actions will appear. Select the “Add” option, then the “Datasource” from the sub-options that appear.

The DataSource Wizard will appear. For Excel datasource, there are four steps:

  • Select datasource type
  • Define datasource details
  • Define schema
  • Define security option

Select Datasource Type

In the first DataSource Wizard page, select “Excel” from the list of available options, then click on the “Next” button.

Define Datasource Details

In this second page, the details of the Excel datasource need to be defined.

Field Description Mandatory
Name Name of Excel datasource. Yes
Description Brief description of Excel datasource. No
URL Defines the location of the Excel file. Yes
Browse When clicked, allows user to browse to the location of the Excel file. No
Range Defines the range of the data in the Excel file.
See Define Range of Excel File on how to define the range.
Yes
Has Row Header If selected, the data in the Excel file has row header.
By default this field is selected.
Yes
Header Row If “Has Row Header” is selected, this field defines the number of header row in the Excel file. Default value is 1.
If “Has Row Header” field is not selected, this field is disabled.
Depends on “Has Row Header” field

The mandatory fields must be filled, else an error message will appear in the page with a red dot and the “Next” button will not be enabled.

Fill in the fields as required and click on the “Next” button.

Define Schema

In the next page, the schema of the Excel datasource need to be defined.

There are two ways to define the schema:

  • Click on the “Infer Schema” button
  • Define the fields for the schema one by one using the buttons on the left

To add a field, click on the “Add” button at the left of the page. The “Add Column” dialog box will appear.

Key in the name of the field in the “Name” field and select the data type from the drop-down list in the “Data Type” field. Click on the “Ok” button to add the column.

Repeat the same process until all desired fields as added.

The order of the fields are according to the sequence they are added. To re-order the fields, select the desired field, then click on the “Move Up” or “Move Down” buttons to move the field to the desired position.

You can also edit the field by selecting the desired field, then clicking on the “Edit” button. The “Edit Column” dialog box will appear.

Edit the information as required and click on the “Ok” button to save the change.

If a field is added by mistake, you can remove the field by selecting it, then click on the “Delete” button.

After all required fields are added, click on the “Next” button to continue. Alternatively, if you wish to use the default security options, click on the “Finish” button to complete the process.

Security Option

The last page in the wizard for the Excel datasource allows you to set the security options for the datasource.

There are three options.

Type Description
Read Only When selected and saved, the next time a user opens this datasource, the user will not be able to edit any details of the datasource (such as name, description and column names).
Hide Details When selected and saved, the next time when this datasource is opened, the user will only be able to see the name and description of the datasource.
Encrypted This is to be used with either Read Only or Hide Details options or both.
Checking the checkbox will prompt the user to enter a password, then re-enter to confirm the password (both password must be the same). After this is done, if another user would like to edit any selections, he will need to enter the password.

By default, none of the options are selected. Select the options are desired. More than one option can be selected. If “Encrypted” is selected, provide a password in the pop-up dialog box. Click on the “Finish” button to complete the process.

The new datasource will appear in the repository on the left.

You can change the security option of the datasource through the DataSource Wizard by clicking on the “Properties” icon at the Top Row in the Workspace after the datasource is selected. The third page in the DataSource Wizard allows you to change the security options.

Define Range of Excel File

Prior to the creation of the Excel datasource, the range of the cells in the Excel file need to be defied.

To do so, open the desired Excel file. Select all the cells that need to be used or click “Ctrl+A”. Under the “Formulas” tab, in the “Defined Names” section, select “Define Name”. The “Define Name” dialog box will appear.

Provide a useful name in the “Name” field. By default, the value of the cell currently selected will appear in the “Name” field. Check the cell range in the “Refers to” field. It should display the first and last cell, that is, A1 to N5000 in this example. Click on the “OK” button to save the defined name. This will allow the datasource wizard to use the defined range in the datasoure.