How to Add 52 screenshots in one Excel sheet but in sequence manner in a particular row/Column

I have a folder in which i have 52 screenshots and now i want to add all the 52 screenshots in One Excel file/CSV file one after one in particular format ,
like Pic1,Pic2,Pic3 are screenshot and want to add in this manner only .

@jyotikanwar2014
have a look on this activity
grafik

1 Like

Hi @jyotikanwar2014

You can loop through each picture in folder and use the balareva activity to add the image to excel cell
https://balareva.com/?page_id=93
Check this for balareva activity for inserting picture at cell

Regards
Nived N
Happy Automation

1 Like

I am not able to download any package it is restricted, so can we do add this images into one text file.

@jyotikanwar2014
maybe working with the Word Activites and adding the image to a word file could be an alternate.

Another option could be to work with the clipboard way:

  • load image into clipboard
  • select cell in Excel
  • paste image from clipboard


find starter help:
Image_toExcelxaml.xaml (7.1 KB)

Hi @jyotikanwar2014
you can try to invoke the c# code using invoke code activivty in uipath to insert image in excel cell

Regards
Nived N
Happy Automation

@jyotikanwar2014 you can use VBA for this. Below code should give you a start:

this one will insert image as icon:

Sub Macro2()
ActiveSheet.Range("A10").Select
    ActiveSheet.OLEObjects.Add(Filename:= _
        "C:\Temp2\Screenshot 2020-10-02 093228.png", Link:=False, DisplayAsIcon:= _
        True, IconFileName:="C:\Program Files (x86)\Internet Explorer\iexplore.exe", _
        IconIndex:=13, IconLabel:="Picture1").Name = "Image1"
        
    ActiveSheet.Shapes("Image1").ScaleWidth 1, msoFalse, msoScaleFromTopLeft
    ActiveSheet.Shapes("Image1").ScaleHeight 1, msoFalse, msoScaleFromTopLeft
End Sub

this one will add visible image (where actual image is visible):

ActiveSheet.Range("A10").Select
ActiveSheet.Pictures.Insert("C:\Users\admin\Pictures\194000.jpg").Select

you can specify the location for inserted image by selecting the desired cell before inserting image
you should use above code in loop
Picture1,Image1,image path should be your variables

Note: Personally I would not advice to add the images in excel file (like in your case there are 50 images which is high number). It may slow down your operations on excel file.

No its not working

@jyotikanwar2014
please tell us always

  • what was done
  • what was not working.

Based on these details we can start to help you. thanks

Done with download file and select the image from my folder location.
Selector issue is coming in hot key

please help me out

@jyotikanwar2014
the selector for the send hot key is to adopt that it is pointing to the excel fro m your end.

give a try on:

  • indicate a cell of the workheet
  • rework on selector that it look like this 2 liner:
    <wnd app=‘excel.exe’ …
    <uia role='…