Posts by ozKev

    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.

    1. Set xlSheet = xlApp.Worksheets("Customer Approval Drawing")
    2. xlSheet.ChartObjects(1) _
    3. .Chart.Export _
    4. 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.