Import DataTable
This activity allows you to import data from excel or csv file into a datatable.
Using Import Datatable Activity
- In the Canvas Tools pane, click DataTable to expand the tool and view the associated activities.
- Drag the Import DataTable activity and drop on to the Flowchart designer area on the Canvas.
- Click File Location to import datatable. The Open windows appears.
- Navigate and select the required file, and then click Open.
NOTE:
If your datatable is being extracted from an excel file, the Excel Sheet field appears in Import DataTable activity. In the Excel Sheet list, select the sheet or worksheet which you want to import in Automation Studio.
- Enter a name for the datatable in the Datatable Name field. A datatable is created and the selected file is imported in the datatable.
- Select the Has Headers option, if you want to import datatable headers.
- Click the
(Settings) icon, and then click the required option to configure the datatable. The available options are:
- Configure Reader: This opens a Reader window to configure rows.
If you want data from a specified section/range of the file to be imported in Automation Studio, enter or select the value in the Row Start and Rows To Take fields respectively.
In the Row Start/Rows To Take field, enter the value of the row. Alternatively, In the Row Start/Rows To Take list, select a parameter that holds the value. You must define the parameter in the Parameter bar to use this option and clear the If Default checkbox. - Configure Headers: This opens the Headers Configuration window to configure columns.
- Name – Name of the header. You can change the name as per your requirement.
- Data Type – The type of data for the header. You can change the data type as per your requirement.
- Column Number – The column number of the header. This field cannot be edited.
- Load – Select the Load option, if you want to import the column else uncheck.
- Configure Reader: This opens a Reader window to configure rows.
NOTE: |
If you have tick mark Has Header check box in Import DataTable activity, then DataTable Headings appears in Headers Configuration window. |
Import DataTable Properties
The properties of Import DataTable activity are listed in the following table and can be edited in the Properties grid on the right pane.
Property Name |
Usage |
Control Execution |
|
Ignore Error |
When this option is set to Yes, the application ignores any error while executing the activity. If set to NA, it bypasses the exception (if any) to let the automation flow continue; however, it marks the automation status as failure, in case of an exception. By default, this option is set to No. |
Delay |
|
Wait After (ms) |
Specify the time delay that must occur after the activity is executed. The value must be in milliseconds. |
Wait Before (ms) |
Specify the time delay that must occur before the activity is executed. The value must be in milliseconds. |
Excel Input |
|
Sheet Name |
The selected sheet name of the selected Excel is displayed. |
File Details |
|
File Path |
The file path of the selected excel is displayed in this field. You can also define the file path directly in this field. The format to define the file is D:\MST\Stock.xls. |
File Type |
The file type of the imported DataTable is stored in this field, such as, excel, csv, tab delimiters. |
Misc |
|
Breakpoint |
Select this option to mark this activity as the pause point while debugging the process. At this point, the process freezes during execution allowing you to examine if the process is functioning as expected. In large or complex processes, breakpoints help in identifying the error, if any. |
Commented |
Select this option to mark this activity as inactive in the entire process. When an activity is commented, it is ignored during the process execution. |
DisplayName |
The display name of the activity in the flowchart designer area. By default, the name is set as Import DataTable. You can change the name as required. |
Output |
|
Column Count |
Define the parameter in argument to store the value and use the stored value in the subsequent process. In this parameter, by default column count of an imported DataTable gets stored. |
Row Count |
Define the parameter in argument to store the value and use the stored value in the subsequent process. In this parameter, by default row count of an imported DataTable gets stored. |
Success Status |
Define the parameter in argument to store the value and use the stored value in the subsequent process. In this property, you can store Boolean value. This value specifies whether the import is successful or not. As per the received value/results whether subsequent process is decided. |