Someone in my company came across a requirement for exporting charts in Microsoft Excel. It was then that he came across some automation for the same. He got a tool for himself, but it was quite buggy and very small in features. It was then that I thought of creating one for myself and what I could see was that there are tools available in the market, but people have kept the code password protected and licensed. I thought of making an excel add-in and making the keeping the code open for use.
I have used the “Sheets (
” to export the charts in excel. Please download the OpenChartExporter add-in here. It is simple to use. Find the steps to install and use the add-in below. ).ChartObjects(i).Chart.Export
Steps to Install the Add-In:
- Download the attachment.
- Open Excel, import the addin (Tools --> Add-Ins --> Browse and add the downloaded vba file).
- Check the flag against the Add-In OpenChartExporter.
- Click OK button and that’s it!
Note: This is a onetime activity to install the add-in
How to Use:
- Open the Excel with charts
- Press Keys “Control + e” to invoke the menu
- Select the target file type, target folder to save the exported image and worksheet whose charts needed to be exported
- Select the chart to be exported, or use the “export all” button to export all the charts available within the sheet
One can view the code by opening the Visual Basic Editor (Macro). Hope it helps you!