RPA | Data Table Command | Automation Anywhere - Part-9
Data Table | The Data table package contains actions that enable us to perform various operations on the values of table variables. We can use the Data table command to join or merge content, search for specific values, insert rows and columns, remove duplicate rows and write values to a file. Data in the Data table is stored in the form of rows and columns as depicted in the image below.
There are 15 sub commands under the Data table command. Let's look at the functionality of each command in detail as follows:-
- Assign command - Assigns the value of the source table variable to the destination table variable.
Here is the code snippet for "Assign command" as follows:-
- Clear Content - This command is used to clear all the content of the specified data table.
Here is the code snippet for "Clear content" command as follows:-
- Get Number of columns - This command is used to retrieve the number of columns that are present in the data table.
Here is the code snippet for "Get Number of columns" command as follows:-
- Delete Column - This command is used to delete a column from a data table.
Here is the code snippet for "Delete Column" command as follows:-
- Delete row - This command is used to delete a row from the data table.
Here is the code snippet for "Delete row" command as follows:-
- Insert Column - This command is used to insert a new column in the data table.
Here is the code snippet for "Insert Column" command as follows:-
- Insert row - This command is used to insert a row into the data table.
Here is the code snippet for the same.
- Join - This command is used to join two data tables together as per the columns specified.
Here is the code snippet for the same.
- Merge - This command is used to merge two data tables together into a single data table.
Here is the code snippet for the same.
- Remove Duplicate Rows - This command is used to remove duplicate rows from a data table.
Here is the code snippet for the same.
- Get number of rows - This command is used to retrieve total number of rows that are present in the data table.
Here is the code snippet for the "Get number of rows" command as follows:-
- Search for a Value - This command is used to search for a specific value from a data table and returns the cell where it occurs.
Here is the code snippet for "Search for a Value" command as follows:-
- Set Value of a single cell - This command is used to allow a user to assign a specific value to a data table cell based on the user specified row and column of the data table.
Here is the code snippet for "Set Value of a single cell" command as follows:-
- Sort - This command is used to sort a data table on the basis of a column by ascending or descending order.
Here is the code snippet for "Sort" command as follows:-
- Write to file - This command is used to write a data table to a specified file. We can write data table values only to CSV and TXT files both.
Here is the code snippet for "Write to file" command as follows:-
Please feel free to reach me out in case of any queries related to the data table article.
Good work!!
ReplyDeleteNice & knowledgeable
ReplyDeleteSo helpful!
ReplyDelete