1

I want to export charts from Excel sheet in PNG format. VBA Method Chart.Export seems to be the right way.

myChart.export filename:=myFileName, Filtername:="PNG"

Filtername:="PNG" produces PNG-24, but I need PNG-8 format (in my case it would save about 50 % of file size). How can I specify the image format?

I have tried setting Interactive parameter to True, which should "display the dialog box that contains the filter-specific options".

myChart.export filename:=myFileName, Filtername:="PNG", Interactive:=True

Nope. No dialog appears. Even if I set Fitlername:="JPG" , no dialog appears.

I have tried set Filtername to "PNG8" a "PNG-8", but these filters does not exist.

Is there a way how to influence image settings? And how can I get the list of allowed filters? (official documentation is: The language-independent name of the graphic filter as it appears in the registry.)

swisst
  • 92
  • 8
  • Tbh, I think `Chart.Export` is buggy... `Interactive` doing nothing is detailed in [this thread](https://stackoverflow.com/questions/65131924/export-excel-chart-to-svg-creates-an-empty-file). – BigBen Mar 08 '21 at 15:30
  • Export it as png - 24 and then use the [batch file in Command-line - Binary for Windows section](https://pngquant.org/) from VBA to convert it to PNG - 8. – Siddharth Rout Mar 08 '21 at 15:44

0 Answers0