Pergunta

I am trying to open a .xlsm file using Win32::OLE from my webpage in perl on windows/apache server.

On researching for this issue, came across the following possible solutions:

  1. Few had it resolved by setting their path to a absolute one. This did no work for me.

  2. Setting permissions for the script to have permissions to access files on server. I am not sure how to go about this. However, I am authenticating my user via windows sspi and will have a userid. Will that user id be verified for file access on Win32::OLE ?

However, I am able to open the file using a File Handle. I have read/written using file handles to files on this server location from my webpage earlier. Is the win32::OLE permissions different from that??

The error is :

Microsoft Excel cannot access the file 'C:\test.xlsm'. There are several
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"

Appreciate any inputs.

Foi útil?

Solução

OK, Finally got rid of the error after several attempts at modifying permissions and running apache as a separate user with all required privileges with no avail, by creating a profile folder for Desktop under

C:\Windows\SysWOW64\config\systemprofile\Desktop

Found this solutions in msdn forum http://social.msdn.microsoft.com/Forums/en-US/innovateonoffice/thread/b81a3c4e-62db-488b-af06-44421818ef91?prof=required Hope this will help someone using these modules in future

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top