I have an excel workbook with charts in different worksheets. I need to export all the charts/pivot tables in an image format using Powershell.
I was able to open excel workbook and activate the current worksheet using powershell(code below). But I don't know how to select the chart on the worksheet and export it.
$Excel = New-Object -ComObject excel.application
$Excel.visible = $true
$Excel.WindowState = "xlMaximized"
$source_wb = $excel.Workbooks.open(C:/abc.xml)
$source_ws = $source_wb.Worksheets.item(1)
$source_ws.activate()
How do I continue with this code to select the chart and export it?