How to use Switch Activity in version 2026. In switch activity i will pass Cell Value. if the cell value is 2 i have add new column using add data row activity, if the cell value is 3 i have add 2 new column using add data row activity.
What issue are you seeing in switch?
also instead of switch you might need to use loop with enumerable.range(0,cellvalue) and add data row inside your loop..so based on cell value the loop would run those many times and will add the rows
cheers
Are you facing any issue? Or if you dont have any idea how to use switch activity, please refer below tutorial,
Happy Automation
- Drag and drop the Switch activity.
- Set the Type of Argument (String, Int32, Boolean).
- Provide the variable in Expression field.
- Add the required Cases and define the activities to execute.
- Last debug the workflow.
Hi @Vanitha_VS,
If this logic continues for cell values 2, 3, 4, 5, and so on, then instead of using a Switch activity, you can use a loop.
Set the number of iterations to CellValue - 1, and inside the loop use the Add Data Column activity to add the required columns dynamically.
This approach is more scalable and easier to maintain than creating a separate Switch case for each possible value.
Thanks

