Hello, I have been using Solidworks VBA to run my excel programs recently. I am trying to open an excel workbook from Solidworks and export its chart as an image. So far, I can open the workbook and get information out of it, but I still cannot export the chart.
Code
Set xlSheet = xlApp.Worksheets("Customer Approval Drawing")
xlSheet.ChartObjects(1) _
.Chart.Export _
fileName:="S:\Engineering Team\SolidWorks\Active Chart\Chart.png"
This is the line of code that exports the chart, however, when I look for the picture in my files I only get the error, "Chart.png: It looks like we do not support this file format"
Does anyone know how to help with this? Thanks.