Read Workbook
This activity helps you to read the whole data from the workbook.
Technical Reference:
INPUT |
IncludeColumnHeaders: Check this box if the column headers has to be displayed. |
|
MISC |
Display Name: Displays the name of the activity. You can also customize the activity name to help troubleshoot issues faster. This name will be used for logging purposes. |
|
SkipOnError: It specifies whether to continue executing the workflow even if it throws an error. This supports only Boolean value “True or False.” True: Continues to execute the workflow irrespective of any error thrown. False: Stops the workflow if it throws any error |
||
Version: It specifies the version of the excel automation feature in use |
||
OUTPUT |
Dataset: Declare a variable here to see the output as a dataset |
|
Result: Define a Boolean value to validate the success state of the activity. This is not a mandatory field. |
||
SheetNames: Declare a variable here to see the sheetnames of the workbook. |
*Mandatory field to read the workbook
Use Case:
The following activity illustrates on how we can use the read workbook activity to read the entire data from the workbook “Test Excel” and get the output in a table. Here we are going to use the variable from the dataset and see how we get the output when the input given in the input table of the table viewer is changed. Here we will be using the input as DS.Tables(0), which gives the data in the first sheet and then give the input as DS.Tables(1) which gives the data in the second sheet.
Example:
1. Drag and drop a get excel object activity to the workflow.
2. Enter the file path of the excel file in which the worksheet to be worked on is present.
3. Drag and drop the read workbook activity into the Get Excel object activity.
4. Click on the read workbook activity.
5. Declare a variable in the dataset box of the output segment. Here it is DS.
6. Drag and drop a table viewer activity from datatable automation.
7. Click on the activity.
8. Give the input as DS.Tables(0)
9. Give the title for the window.
10. Execute the activity.
11. To see the second set of data, enter the input as DS.Tables(1) in the input table of the table viewer property box.
12. Execute the activity again.
The bot executes the activity and gives the first sheet as the output when the input is given as DS.Tables(0) and gives the second sheet as the output when the input is given as DS.Tables(1).ss