How to read a spesific word in cell

I have a long Path in written in cell in Excel sheet i need to take a part of this long path in a varible so what should i do?

Hi @omar_ismail

Use a read cell activity and then use string manipulations in order to take just the part you need

Regards

can you clarify string manipulations way please?

well it depends on the situation, can you provide an input example and expected output for your case? so we can help better in this way

Regards

this is a Photo path written on a cell in excel i need to get the (account 1) word or what ever will be in a variable

K:\QualityAssurance\Majid Al Futtaim\MAF\Omar\Transformation\Projects\BOTs\Onboarding BOT\OB Folder*Account 1*\IDs\Screenshot 2023-07-03 211243.png

So you can use a read cell activity to retrieve the entire path

then just use this function to retrieve the part you want, here is an example, asume that strInput equals your cell variable

image
image

Regex.Match(strInput, "Account\s\d+").Value

Regards

and where i can use the output from the read cell activity as i need to read the path in the excel
sorry if i can’t get it easy as it’s but i need it so urgent

image
this the cell that contain the path
and how can i get the output form write line activity

Regex.Match(CellPath, "Account\s\d+").Value

put the above code in a write line activity

Regards

Try with

System.Text.RegularExpressions.Regex.Match(CellPath, "Account\s\d+").Value

Kindly go to the imports panel and import the System.Text.RegularExpressions

Also write well the expression please, it contains more " than i shared above, just copy the one that i shared…

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.