In my script, I gather the table from an excel file and put it into a data table. The data table will be looped and I have a string input where it defines the column where I’ll be basing my condition for the data table. As an example, in the image below, I’ll be setting the string input that defines the column as “L” and a condition where if Diff is > 10,000, the whole row will be store in another data table.
With string input set as “L”, the column count would be 3 since it’s the 4th column in the sample table. Which will make the condition into CurrentRow(3)>10000
The reason why I use the string input is to make the process dynamic, whenever we want to change the column we want to base our condition on. So I prefer to base on excel columns instead of column names that was set.
While you are reading the excel, check the AddHeaders checkbox to get the column names as well. Without column names I don’t think you will be able to check that condition.
I think if there is a change of column positions in future, it will be always preferable to go with the Column Name. It will be more accurate and you can use the Column name to filter the values instead of the column index.