Hello Everyone, Hope you are doing good
I would like to present this post who are looking for the Modern Activities
Very first thing is to Enable the Modern experience
(from Classic)
Go to → Activities Panel → Click on Filter → Select Show Modern.
Let Jump into the Tutorial
we are look into some Modern activities
-
Delete Column
-
Filter
Note : We need to use Excel Process Scope
and Use Excel File
for all the above activities
Excel Process scope
Opens or reuses Excel processes, loads the Excel project settings and applies them to the associated Excel file.
Use Excel File
Lets you select an Excel file to use in the automation and enables StudioX to integrate with Excel. The data in the file is available to all the activities added inside Use Excel File. This means that when you configure child activities, you can select data from the file directly from StudioX.
Delete Column
Description - Deletes one or more columns from a sheet, table, or range in an Excel file. The activity can be used with an Excel file selected for a parent Use Excel File activity or with the Project Notebook.
Step 1 : Use Excel process scope followed by Use Excel file activities.
Step 2 : Use Read range activity and Store the Output
Range : Excel.Sheet("Sheet1")
Save to : DtReadInput | Variable Type -> System.Data.Datatable
Step 3: Use LookUp Range activity (Classic) Searches in a specified range for the coordinates of a cell.
Sheet Name : "Sheet1"
Value to search : "Phone Number"
Output : Create an Output -> LookupPhoneNumber | Variable Type -> String
Step 3 : Use If activity to check the column is exist or not
LookupPhoneNumber.Equals(-1)
Then -> Use Log message activity -> "---> There is no Phone Number column in the input excel file"
Else -> Use Delete Column activity
Source : Excel.Sheet("Sheet1")
Note : "Enable the Has Header Checkbox"
Column Name : "Phone Number"
Filter
Description - Creates a filter in a range, table, or sheet based on the values in a single column. Can also be used to clear existing filters. To filter for multiple columns across a single range/sheet/table, you must use multiple Filter activities targeting the same source range.
Step 1 : Use Excel process scope followed by Use Excel file activities.
Step 2 : Use Read range activity and Store the Output
Range : Excel.Sheet("Sheet1")
Save to : DtReadInput | Variable Type -> System.Data.Datatable
Step 3 : Use Filter Activity, In this we only Filter the Column
Source : Excel.Sheet("Sheet1")
Column name : "Company Name"
Click : "Configure filter" | Basic filter option
Value : Is Equal to | "Timepath Inc."
Visual
Check out the Project File
Forum_ModernActivities.zip (91.6 KB)
Hope this will be helpful
Questions
For questions on your retrieval case open a new topic and get individual support
Feedback
Click button to share your thoughts
Regards
Gokul