FYI : I have used help of chatgpt for your issue, please kindly let me know if any of the below options worked for you!!
happy Automation!!
Option 1: Use Excel’s native “Copy as Picture” feature (via VBA or UiPath activities)
Steps
Use Excel Application Scope
Open your Excel file using the Excel Application Scope.
Get Used Range
Use Read Range (without specifying a range) to get the used range.
Optionally, store the address of the used range using an Invoke Code or Get Workbook Sheets activity if needed.
Use VBA to Copy as Picture
Add an Invoke VBA activity.
Create a simple VBA code like this:
Sub CopyUsedRangeAsPicture()
Dim ws As Worksheet
Set ws = ActiveSheet
ws.UsedRange.CopyPicture Appearance:=xlScreen, Format:=xlPicture
End Sub
Save this code in a .vbs or .txt file and point your Invoke VBA activity to it.
Paste the Copied Picture to a Temporary Excel Chart
Add another VBA snippet to paste and export it as an image:
Sub SaveUsedRangeAsImage()
Dim ws As Worksheet
Dim ch As Chart
Set ws = ActiveSheet
ws.Paste
Set ch = ws.ChartObjects.Add(0, 0, ws.UsedRange.Width, ws.UsedRange.Height).Chart
ch.Paste
ch.Export Filename:="C:\Temp\UsedRange.png", FilterName:="PNG"
ch.Parent.Delete
End Sub
This will save your used range as an image (UsedRange.png).
Insert the Image into Word
Use Word Application Scope.
Then use the Add Picture or Insert Image activity to paste the saved image.
Option 2: Use the UiPath Screenshot Method (simpler but less precise)
If you don’t need pixel-perfect export:
Open Excel and Select Used Range using Select Range activity.
Send Hotkey:Ctrl + Shift + Space (select entire used range if dynamic).
Use Take Screenshot activity (from UiPath.Core.Activities).
Store the image output in an Image variable (e.g., imgExcelRange).
Save Image activity to save it as a file (e.g., C:\Temp\UsedRange.png).
Insert Image into Word as above.
This approach is faster but depends on screen resolution and Excel window state.
Option 3: Use Python or .NET Interop for High Quality Export
If you want programmatic precision (for example, to generate reports automatically):
Use a Python Script activity with the openpyxl + matplotlib approach to render the DataFrame as an image.
Save as .png, then insert into Word.
Pro Tips
Make sure Excel is visible (set “Visible” = True) when using CopyPicture or Screenshot approaches.
@Srija, I am also searching for a direct UiPath Activity to perform this task, but I think there is no such activity available and using VBA is ok, but here I am facing the Trust Centre Issue in Excel.
Excel interop won’t give you a raw image, so the usual move is UsedRange.CopyPicture(...) → pull the bitmap from the clipboard → hand it off to word. either save it to a temp png and call InlineShapes.AddPicture, or skip the file entirely and just do word.Selection.Paste() right after the copy. that’s basically the only clean path unless you dive into openxml.