Allow me to offer some debugging suggestions. "thru Apache under CGI" probably translates to "under a different user account with a different path and different permissions." That is probably the key to this puzzle.

OLE->new() loads a DLL. You can use procexp.exe from sysinternals.com to figure out which DLLs are loaded for a process. Using sleep(), you can slow down your execution and watch as DLLs get loaded. Pay attention to what is loaded when it works. Check that DLL out and see if it can be accessed by the account running apache (again, procexp can help you figure out what that account is). It may even need to be in the path (procexp again).

If you can't figure it out from that, use filemon.exe from sysinternals.com and filter out all but the apache process. Look and see what file isn't getting loaded correctly and what the reason is.

--NerdMachine


In reply to Re: Under CGI Mode Unable to access the Excel Application using Win32::OLE by NerdMachine
in thread Under CGI Mode Unable to access the Excel Application using Win32::OLE by jarlakhnet

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.