Write Ranges
This activity is used to enter a range of data into the excel sheet.
Technical Reference:
|
INPUT |
Datatable: Specify the variable which has the stored values to add into the excel file. |
IncludeColumnHeaders: Check this box if the column headers must be added. |
||
Range: Specify the range of cells to which the data must be written. |
||
SheetName: Specify the sheetname to which the data must be written. |
||
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 |
Result: Define a Boolean value to validate the success state of the activity. This is not a mandatory field. |
*Mandatory fields to execute the workflow
The following activity illustrates on how we can use the write ranges activity to get the data from a read ranges activity and write it on another sheet. Here we are going to read a range of data from “Sheet 1” of “Test Excel” Workbook and write the read data to the “test” worksheet of the “Test Excel” workbook.
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 activities have to be executed
3. Drag and drop a read range activity into the Get Excel object activity.
4. Click on the read range activity.
5. Specify the range of data to be read from the worksheet. Here it is “A2:D5.”
6. Specify the name of the sheet from which the data must be read. Here it is “Sheet1.”
7. Declare a variable in the datatable box of the output segment to store the read values. Here it is DT.
8. Drag and drop a write ranges activity below the read ranges activity.
9. Enter the same variable declared in the read ranges activity to the datatable box in the input segment of the write ranges activity. Here it is DT
10. Specify the range of cells to which the data must be written. Here it is “A9:D12.”
11. Specify the sheet name to which the data must be written. Here it is “Test.”
12. Execute the activity
The bot executes the activity, gets the data from the read ranges activity and writes the data to the given ranges in the specified worksheet.