in reply to Re^2: Win32 OLE error 1403
in thread Win32 OLE error 1403

-w is a file test operator. It tests to see if the running script can write to the specified file. I suggested this because I suspect your export might have failed because it can't write to your output file, and is giving you a misleading error message.

If you've run this and the print statement ran then you could have a problem with file permissions, or just have a bad path. Although thinking about it, -w can only return true if your file already exists, so may not be useful to you.

try temporarily adding

open TEST, ">>$savename" or print LOG "Couldn't open file for appending: $!\n"; close TEST;
That's a better test to see if you've got permission problems, and any error will be logged.
---
my name's not Keith, and I'm not reasonable.

Replies are listed 'Best First'.
Re^4: Win32 OLE error 1403
by Nalina (Monk) on Aug 24, 2005 at 06:36 UTC
    I tried opening the png file in write mode. Its creating the file. the only problem is in exporting the chart from xls to png.