Screenshot and excel

Hi,

How do i paste a screenshot in a particular cell in the excel sheet?

Hi,

Can you do it using Invoke VBA activity, record a macro in excel by manually inserting an image?
You can pass dynamic cell no. while invoking VBA in UiPath.

Thank you!

have a look on Balareva:

grafik

@RACHEL_PAUL

  1. paste below code in text file e.g. vba.txt
  2. in excel application scope, call invoke vba activity, pass in parameters e.g.
    {"Sheet1", "H3", "C:\test.jpg", 50,50}
    this means insert image C:\test.jpg to H3 cell in sheet1, set width/height to 50 pixels

Function InsertImage(sheetName as string, cellAddress As String, imgPath As String, imgWidth As Integer, imgHeight As Integer)

    ActiveWorkbook.Sheets(sheetName).Activate
    
    Set Image = ActiveSheet.Pictures.Insert(imgPath)

    Image.Top = Range(cellAddress).Top
    Image.Left = Range(cellAddress).Left
    Image.ShapeRange.height = imgWidth
    Image.ShapeRange.width = imgHeight
    
    ActiveWorkbook.Save
End Function

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.