in reply to Re^2: win32::ole runs under cmd line but not cgi
in thread win32::ole runs under cmd line but not cgi

I see, the (in)famous legacy problem. Say no more, we suffer from similar problems.

May I suggest another solution? Rather than starting the Perl program to start Excel from the server, have the Perl program started regularly from a cron-like program at regular intervals. No need to bother the server and if the intervals are small enough, the various users should not have to wait too long before the files show up in the right directories.

That being said, I should start thinking of transferring all these VBA-programs to Perl as it seems something for which Perl is really made. It is still time to apply for a budget for such project for next year!

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

  • Comment on Re^3: win32::ole runs under cmd line but not cgi

Replies are listed 'Best First'.
Re^4: win32::ole runs under cmd line but not cgi
by suzun30 (Acolyte) on Apr 15, 2013 at 22:11 UTC
    I know this has been a long time, I am facing similar issue. Is there a common approach for this issue? Although I am not getting the error as stated here, I am still not able to open the file and my code dies when executed via the webserver. Also, I am authenticating my users using SSPI. So I do have the remote_user variable set. But does not seem to help in authenticating for file access via Win32::OLE. Any other way to run a macro from .xlsm file in perl?
      Running an Excel spreadsheet macro inside the webserver seems a very bad idea to me. It will involve so much overhead that response times will suffer.

      Can you log in on the server using the credentials of the web-server? Are you then able to open the spreadsheet and run the macro?

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      My blog: Imperial Deltronics