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

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^3: Win32 OLE error 1403
by reasonablekeith (Deacon) on Aug 23, 2005 at 13:20 UTC
    -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.
      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.