Hello Monks,

I am running Vista, IE8, IIS7 and am developing a Perl script including HTML and JavaScript. My script opens an existing Excel spreadsheet to read, write, process and display in browser on localhost. From command line my Perl script runs perfectly, but when run in browser on local host I get "Win32::OLE(0.1709) error 0x80070005". Relevant script is:

#!/perl/bin/perl -w use Win32::OLE qw(in with); $Win32::OLE::Warn = 3; # die on errors... $Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); $Book = $Excel->Workbooks->Open("c:/scripts/RBLCopy.xls"); $xlImport = $Book->Worksheets("Import"); $xlImport->Activate(); $Excel->{'Visible'} = 1; my $cell= $xlImport->Cells(1,1)->{Value};
Error occurs at line:
$Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OL +E->new('Excel.Application', 'Quit');

I have searched the Monastery, many other sites, and am still waiting to here from Microsoft. I haven't found anything that works. What am I missing or doing wrong?

Please help me!

david

In reply to Win32::OLE GetActiveObject not working in IIS7 by deruxer

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.