mrdowns has asked for the wisdom of the Perl Monks concerning the following question:
It runs successfully and instantaneously from the command prompt for any Excel document which I pass in. Now, I need to call this script from SQL Server using xp_cmdshell. When called in this way, it runs for about a minute, and the following error is generated:#!/usr/bin/perl -w use diagnostics; use strict; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Excel'; my $file = shift(@ARGV); my $Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32: +:OLE->new('Excel.Application', 'Quit'); my $Book = $Excel->Workbooks->Open($file);
Line 10 is "my $Book = $Excel->Workbooks->Open($file);".Win32::OLE(0.1502) error 0x800a03ec in METHOD/PROPERTYGET "Open" +at c:\perl\excel\TestRead.pl line 10
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problems opening an Excel file...
by jmcnamara (Monsignor) on Feb 09, 2005 at 23:57 UTC | |
by olivierp (Hermit) on Feb 10, 2005 at 11:33 UTC | |
by mrdowns (Initiate) on Feb 10, 2005 at 15:50 UTC | |
by olivierp (Hermit) on Feb 10, 2005 at 16:23 UTC |