Extract and Replace value in Excel Macro


I’m working on a robot that attempts to find an Excel Macro, extract the value (being a folder directory) and then replace it with a new value. I can locate the line I need to extract, But I do not know how I’m gonna replace the string.

Using string manipulation, I’ve selected this value from the GetFullText activity. I just need to know how i’m gonna write into it, on that line again specifically, with the type into activity? I was thinking to use the Replace function to insert the new desried criteria.

Cheers for any help!


Buddy @TommyHudd

Welcome to UiPath Community buddy, thats really good question to start wih

In uipath we have an option called Execute macro, where we can pass any value to macro with parameter properties…

So for your case you can go for the same buddy


I’ll give that a go - thank you!


Great…try and let know whether it works or not buddy @TommyHudd


So I’ve indentified the Excel workbook and the macro name… now I just need to know to pass the parameter in, and on the correct line once again!


Great in macro the place where you want to pass this variable, mention like this just for example
Sub WrapText(Path As String)
FolderLocation = “” & Path).Select

And in studio execute macro activity pass the filepath variable in parameter like this buddy


is that working buddy

Couldn’t get it just yet - gonna keep trying a few things. Thanks for your help so far :slight_smile:

1 Like

No worries buddy, kindly let know if you face any issues…

Cheers keep going