When hen copying an Excel cell content with Ctrl + C, a new line (hidden character) will append automatically at the end of the copied content as below screenshot shown.
If you want to use the cell content in the next action or plugin as a variable, you have to remove the new line break character. Please, do as follows.
Step-by-step guide
Create a user variable to save a cell content, Settings > User variable in Scenario ..
Click "click here to add a new row" and type "GroupName" & "VariableName".
I defined '"{{g1,G1.v1}}'".- Select a cell you want to copy the content. You can use 'LocateImage' like this example.
- Select 'X2 (double click)' in 'Click Type'.
- Add 'ShortcutKeys' and add key sequences, Home, LShift + End, LCtrl + C. Of course, you can use RShift + End and RCtrl + C instead.
Now, your cell data is selected and copied to clipboard. Add 'SetVariables' and set 'Clipiboard' value to your previous defined variable,
Sample Bot
Bot: sample-excel01.zip
- Data: sample-excel01.xlsx
Build on
- STU: R19.0723
- PAM: R19.0603
Prerequisite for running this bot
- Excel
- Notepad
How to run this bot
- Download and save a sample bot / excel file
- Run STU
- Select 'File > Import' and choose a download bot .
- Run your own Excel and open the sample excel file
- (Option) Capture a screenshot for LocateImage
- Run Notepad
- 'Run > Test Run' in STU