Modify only rows in Excel that contains "String"


I am building my first robot that will check if all received orders are written into Order Table.
We are receiving orders from few different companies so file name is different for each other but all have one in common: each file name contains order number. The goal is to get that order number, write into excel then check that such number exists in Order table.

sample order number:

I bolded order number.
my idea to get that number:
If ExcelRow contains “BATU” then do action
If ExcelRow starts with P11010 then do action

The problem is that Bot do action from first if so I got wrong result for second Order type
How can I do something like that:
Modify text in Excel row that contains “BATU”
Modify text in Excel row that starts with “P11010”

Thank you in advance for your help


Welcome to the forums

You can use TryCatch for this, so if there is any exception you can write the steps in the exception block

Hope this may help you


1 Like

when we can rely on some pattern maybe Regex will help

[CheatSheet] - System.Text.RegularExpressions | RegEx - News / Tutorials - UiPath Community Forum

1 Like

I do not have TryCatch in my StudioX

looks complicated but I will try,thanks. It might be handy to know Regex