Uploading images in Excel sheet

Hi @Anushka_Purohit

Save this vba snippet in a .txt file in your project:

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.

Method Parameters Argumets: {strImagePath, strWorksheetName, strCell}
You can make variables of this arguments.

Hope this helps :slight_smile:

1 Like