Import from Excel File#

Rulex Factory, through the Import from Excel File task, allows users to import MS Excel files, specifying the data sheet you want to import.

The Import from Excel task is divided into two tabs: the Options tab and the Excel Configuration tab. The characteristics of both tabs will be explained in the next sections.


The Options tab#

The options tab follows the structure shown in the Import Overview page, except for an additional tab in the Location Controller pane: the Sheets tab, whose information and characteristics will be explained in the following section.


The Sheets tab#

The Sheets tab is divided into two panes:

Sheet options

Within this pane, users can set the following options:

  • Match sheet by position. If selected, the sheet will be imported according to its position. A numeric check boxed list, containing the imported sheets, will appear in the Sheet name pane.

  • Sheet imported mode. Through the provided drop-down list, users can select the way they want to import their selected sheets. Available values are:

    • Import selected sheets. If selected, all selected sheets will be imported.

    • Import all but selected sheets. If selected, all sheets will be imported, except the selected ones, which will be excluded from the import operation.

    • Import all sheets. If selected, all sheets will be imported.

Sheet name

Within this pane, users will find a list of the selected sheets from which they will be able to import their chosen data. On the right of the pane, further available options are:

  • Check All Sheets: if selected, all the available sheets will be selected.

  • Uncheck All Sheets: if selected, all the previously selected sheets will be unselected.

  • Invert: if selected, the whole selection will be inverted: the selected sheets will be unselected and vice versa.


The Excel Configuration tab#

The Excel Configuration tab is divided into three panes:

Parsing options

These options allow users to transform their chosen data into a more readable format.

Within this panel, users will find:

  • the Missing string checkbox; enter the word that represents missing values in the dataset, for example “N/A”, “missing”. These words will be removed from the dataset, effectively leaving an empty cell.

Import options

Within this pane, users will find the following options:

  • Start importing from line: the number of the line from which the importing operations will start.

  • Start importing at line (0 means all): the number of the line where the importing operations will end. Leave the value 0 if you want the whole dataset to be imported.

  • Get names form line: the number of the line from which the column’s names will be taken.

  • Get types from line: the number of the line from which the attributes’ types will be taken.

  • Column to be imported (empty for all): the number of columns to be imported. If left empty, all the columns will be imported.

  • Remove empty rows: select the checkbox if you want to remove the empty rows from the imported dataset.

  • Add an attribute containing: select this option to add an extra column with the name of the file to the dataset.

  • Remove empty columns: select the checkbox if you want to remove the empty columns from the imported dataset.

  • Case sensitive: select the checkbox if you want the upper cases to be considered different from lower cases. Read below all the consequences on your data if this checkbox is selected.

  • Strip spaces: select this option if you want to remove spaces surrounding strings. For example, the string “ class “ will be imported as “class”.

  • Turn off smart type recognition: if selected, prevents automatic recognition of data types, leaving the generic nominal type. This option is useful when manual identification is preferable, for example when there is the risk of a code being misinterpreted as a date. However, if data types have been specifically defined in incoming MS Excel files, these data types will be maintained, even when the Turn off smart type recognition option has been selected.

  • Compress white spaces: select it to remove extra consecutive spaces from within strings.

Table Preview

Within this pane, users will be able to visualize a preview of their imported tables.

On the right of the Tables pane, users can find the Number of records in preview spin box.


Example#

  • After having imported a Microsoft Excel file onto the stage, drag an Import from Excel task onto the stage and link it to the source task.

  • Double-click on the task to open it and configure the selected task as explained above in the Options tab and the Excel Configuration tab sections.

  • According to the selected Microsoft Excel file, your Import from Excel task should look like the example provided below.

https://cdn.rulex.ai/docs/Factory/import-excel.webp