Basically tittle. I’m trying to write an excel file with a small Data Row with information that I obtain from a website. The information in the data row are small strings and the screenshot of the website in the moment I obtain the information. If I try to write the Excel file with only the strings it works with no issues but when I add the screenshot I get the exit code 0xE0434352.
I really need to add the screenshot to the Excel file and I have not found any workarounds. Could you try give me a bit of insight into this issue?
Hie @ulises.ariza can you try to use invoke VBA activity which help you to insert image in the excel file.
here the script
Sub InsertImage()
Dim imgPath As String
Dim ws As Worksheet
' Specify the path of the image
imgPath = "C:\RPA Projects\BlankProcess7\Untitled.bmp" ' Update with the correct path
' Set the worksheet object to the desired sheet by name
Set ws = ThisWorkbook.Sheets("Sheet2") change here the sheet name as per you requirment
' Insert the image into the specified worksheet
ws.Pictures.Insert(imgPath).Select
' Set the image properties (resize and position)
With Selection.ShapeRange
.LockAspectRatio = msoFalse
.Width = 200 ' Set the width
.Height = 150 ' Set the height
.Top = ws.Range("A1").Top ' Position the top of the image
.Left = ws.Range("A1").Left ' Position the left of the image
End With
End Sub
after writing this code on notepad name this as example - image.vbs
Will try doing this and will let you know. I have a question with the code. I reckon I can dynamically change the cell where I want to paste the image with the code arguments, right?