How to insert image in Excel Using VBA?
- Save this vba snippet in a .txt file:
Sub InsertImageToExcel(imagePath,workSheetName, cell)
Set myDocument = Worksheets(workSheetName)
myDocument.Shapes.AddPicture _
imagePath, _
False, True, Range(cell).Left, Range(cell).Top, -1, -1
End Sub
- Use Invoke VBA inside an Excel Application Scope.
EntryMethodParameters: {strImagePath, strWorksheetName, strCell}
Example of EnterMethodParameters: {"C:\Users\UserAccount\Downloads\sample.jpg", "Sheet1", "A1"}