in reply to Re^3: cygwin, make, perl, win32::ole (excel) problem
in thread cygwin, make, perl, win32::ole (excel) problem

Hello, I have followed your advice and here is the result:
Cannot open - Y:\In\filereport.xlsOLE exception from "Microsoft Office + Excel": Excel cannot access 'filereport.xls'. The document may be read-only o +r encrypted. Win32::OLE(0.1703) error 0x800a03ec in METHOD/PROPERTYGET "Open" at Y:/In/FileReport.pl line 172
The file is not read-only or write protected and it shouldn't be, this is the main reason I'm using Y: drive, which is mapped as a basic user and grants full control to it. I googled the 0x800a03ec error but didn't came up with something relevant, I will continue digging the internet for an answaer to this error. If you have any ideea abut this err please help ! Thanks.

Replies are listed 'Best First'.
Re^5: cygwin, make, perl, win32::ole (excel) problem
by Corion (Patriarch) on Dec 03, 2008 at 15:19 UTC

    Always give absolute filenames to Excel. The "current directory" for an OLE object can very well differ from what your application thinks its current directory is. So if you change filereport.xls to become Y:\In\filereport.xls in your call to $excel->Workbooks->Add() it should work, or fail in a different way.

      Hi Corion,

      Long time, no speak.

      AFAICT (from the generated error message) an absolute path _is_ being passed in - it appears as tho' Excel takes it upon itself to report the error as a relative path - I wondered, as you've no doubt seen, whetehr the containing dir exists with the right perms...

      Update

      self-- ... I got Corions name wrong :-((

      A user level that continues to overstate my experience :-))
Re^5: cygwin, make, perl, win32::ole (excel) problem
by Bloodnok (Vicar) on Dec 03, 2008 at 16:07 UTC
    You are sure that the containing directory In exists in Y:\\ and has the same permissions as the mount point ??

    A user level that continues to overstate my experience :-))
      Hi, Inside Y:\in\ are all the input files that are needed for the operation, including the perl script and the excel template. when mapping a virtual drive all its components (files) inherit the virtual root drive proerties that has been created, this is the reason I am using this method.