in reply to Re^2: Win32::OLE excel application macro execution
in thread Win32::OLE excel application macro execution

Hi,

Corion is correct, this usually comes down to permissions.

Try printing out the perms for all the files etc., you are accessing. And print the whole %ENV and anything else that comes to mind.

The problem will probably be in the differences. Well it's a starting point. Get these out of the way and if it's still not working, come back with more details.

J.C.

  • Comment on Re^3: Win32::OLE excel application macro execution

Replies are listed 'Best First'.
Re^4: Win32::OLE excel application macro execution
by suzun30 (Acolyte) on Apr 16, 2013 at 05:06 UTC

    Thanks for the inputs. I also was able to get the error using Win32::OLE->LastError() and this is what it shows.

    Microsoft Excel cannot access the file 'C:\test.xlsm'. There are sever +al possible reasons: • The file name or path does not exist. • The file is being used by another program. • The workbook you are trying to save has the same name as a currently + open workbook. Win32::OLE(0.1709) error 0x800a03ec in METHOD/PROPERTYGET "Open"

    The users on this server have permissions to read and execute files and folders from what I can see on the properties of the file I am trying to read from. I did print out the Env variables like suggested, but apart from the remote_user variable which is set to the currently logged in user ,who does have privileges to read and execute, nothing seems to be of any use. I found this thread which seems to talk about the same issue, but have not found a solution yet. http://www.perlmonks.org/bare/?node_id=477477

    Few other sites for the same issue, the user had to change the format of file path, which I have already tried to no avail. Please help.

    I also verified if I am able to read the file by opening it using file handle and it opens fine. Also , I have written and read files from this location from my webpage previously. Is it because this is being done via win32::OLE that it is requiring some more authentication? Appreciate any pointers