Thank you for the screenshots.
You would need to modify the extracted values before you write these to the excel file. Technically once there is a value extracted for the variable fromaccountselected
(e.g. after step 10) use it in a coded step to modify the string as per your requirements and store the new desired string to a variable. Then use that new variable to enter its value in the excel file.
As fat as I could see from the screenshot the current coded step is placed somewhere after all of the extractions. Thus you could use it to modify the strings - simply do this before writing to the excel. In my previous reply I shared the MS docs article how to edit a string in C# which you will need to implement.
To be more clear the actions should be similar to these below:
1. Extract an element's value and store in a variable (could be either in code or through the UI).
2. In a coded step using the C# capabilities to edit string, modify the extracted variable value and store it to a different variable.
3 .Use the newly created variable to pass as an argument to write in the excel file.
Please let me know if that makes sense to you or further assistance will be required.