How to store image in variable or list

Dear Team,

I need to save 4 images in list and after that need to paste excel one by one. Can you please give me solution for that?

Hi @amol_sonavane you cannot save the images themselves in a variable, only text.

In your case, you can open website, use mouse clicks and keystrokes to save the images on your computer and then open Excel and insert the images there using mouse clicks on window controls. (10.5 KB)

1 Like

Hi Ashapkina,

thanks for reply. But i need to take screenshot of webpage (Perticular area of website )and after that paste it into excel

Oh, I see… Then try using the approach @timriewe suggested

1 Like

HI Ashpkina,

I have tried Tim method. But cntrl+v is not working when flow running rest of all steps are working fine.

When I do cntrl+ v manually after pasting it clipboard then its working (124.7 KB)

please find attached code. please help me

It happens because you open Excel in the background, using built-in Excel actions.
For the keystrokes to work, you need to open the file on the screen (as in my example above) so the bot can interact with the UI.

1 Like

ok thank…i will try

Hi Ashpkina,

its working fine. but how to add next image to next cell.

Hi Amol
I believe you cannot select a cell in Excel to add images. Images can be inserted/pasted on top of the Excel grid. Is it necesary to do it in Excel? If you only need to paste several screenshot I would use Word instead. There after each paste action you can do keystrokes
and paste the next screenshot.

Thanks TIm,

The scenario is there is multiple websites in excel e.g from cell A1 to A5 there is 5 websites. So I need to page screenshot of website to his next cell.

So A1 website screenshot is put into B1 cell like this

Hope you will understand the scenario.

Please give me solution.

@amol_sonavane do you read the websites into a List variable and then make screenshots in For Each loop? If you do, you can create a counter variable to define the cell to click on before pasting the image and increment it by 1 at the end of the loop, so for the 1st image it will click B1, for the 2nd - B2, etc.


Yes Ashapkina, I want to take website from excel and then paste there screenshots infront of them.

Can you please share this code file?

When i have taken null in for loop its gives me error

“Unable to read”

Can you please tell me how to iterate loop?

I have changed your recording to show the general logic
You will need to provide correct paths to files/applications for it to work (38.0 KB)

1 Like