in reply to Exporting an Excel Chart to PNG using Win32::OLE

Not sure if it was a typo in your code, but you define $savename in the innermost loop, but write to $savename1 (the FileName parameter) in the Export method when writing the image.
Code is untested unless explicitly stated

Replies are listed 'Best First'.
Re^2: Perl & Win32
by gellyfish (Monsignor) on Mar 18, 2005 at 11:42 UTC

    Well spotted, this is of course why it says:

    Execute your scripts with perl -w and use strict - this catches most of your errors.
    in the Using OLE with Perl FAQ that comes with ActivePerl.