Store cell value (google sheet)

Hello,

I’m trying to automate the copy of some cell values from a google sheet to another page.

WHAT I THOUGHT

  • (manually) Copy the 1st row value to clipboard and activate automatism OK
  • Use XType to find the value
  • Use XType to move to the next column
  • StoreValue
  • Echo (to check the value)
    (etc.)

The value isn’t stored. I also added an Xtype Enter, do make sure the cell was selected.

Any help would be greatly appreciated.

Post mavro code please

The google sheet can be any sheet, so I guess there is no need to post a link.
It just has to have, for example, values in 2 columns, being the one in the first column the value I have stored in the clipboard before using the “macro”.

You can see I have some steps marked as “comment” because that was another approach.
I thought I could make sure that I was on the right row and that the 1 cell column was selected if I used the search.
The active part of the code, assumes the cell is already selected in the google sheet.
On both versions I’m trying to store the value of the second column, so I can use it elsewhere, with no luck.

{
“Name”: “Google Sheet copy”,
“CreationDate”: “2021-7-8”,
“Commands”: [
{
“Command”: “bringBrowserToForeground”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “FAST”,
“Value”: “!replayspeed”,
“Description”: “”
},
{
“Command”: “comment”,
“Target”: “XType // ${KEY_CMD+KEY_F}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “comment”,
“Target”: “XType // ${!clipboard}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “comment”,
“Target”: “XType // ${KEY_RIGHT}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “XType”,
“Target”: “${KEY_RIGHT}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “XType”,
“Target”: “${KEY_ENTER}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “storeValue”,
“Target”: “xpath=//*[@id=“249091254-scrollable”]/div[2]”,
“Value”: “flight”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “${flight}”,
“Value”: “”,
“Description”: “”
}
]
}

This is a long and complex work to do.

I automate LIbre office calc and i used more and more time to do.

I suggest you to convert google sheet in csv, import csv in ui vision after create the job.

Creare a desktop automation macro require more time and and a lot of experience.

The number of rows we need to copy varies and it can be as less as one/two/three to up to 20 or more, but it’s not worth it to convert the file to csv every time unless we need to copy paste big lists. It’s a repetitive task but not done all at once.

As Google Sheets being an online tool, I thought it wouldn’t be that hard and also, I can already move between rows.

Since I was already using the XModules, after selection the right cell/column, I’ve copied the data to the clipboard, assign a variable to it and if I echo, it works! Now I can paste it elsewhere.

So, if nothing better, this will be what I will be adding to the code:

{
“Command”: “XType”,
“Target”: “${KEY_CMD+KEY_C}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “${!clipboard}”,
“Value”: “flight”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “${flight}”,
“Value”: “”,
“Description”: “”
},

As a sidenote, I really appreciate you or anyone else taking the time to answer, but - and because this was not a first - always answering that it is too hard, respectfully, I don’t think it’s that helpfull. I’m looking for approaches / ideas, not the work done.

Using xtype you have not control about error, using csv you can have complete control of all errors with statusok.

With free plan you can use max 25 Xclick/Xtype per macro another limit, using csv you can not use Xclick/Xtype and work with free version of ui vision.

Using Xtype and Xcick you must have always focus on screen, using csv you can have ui vision in backgroud that work anche you can make another job :grinning:

There are more disandantage creating a work directly on Google Sheet

Hello,

I do use csv everytime i can, and i agree with you, it works great! It’s also faster and I will certainly create a version with that approach if we come to the need of copying and pasting several rows in one task, but when it comes to smaller tasks, like this one: copy 3 cells from a row, i think xmodules do the trick because In this case, it’s something we do everyday but not in bulk, and we don’t kneed to do any other task during the seconds the automatism takes to do the job.

Anyway, thank you again for your input.

1 Like