On Wed, Sep 26, 2012 at 8:23 AM, Jason Feng <q15...@hotmail.com> wrote:
>
> Hello,
>
> I have a Perl script running on a Windows 2008 server which uses Win32::OLE 
> to dump the results on Excel files. It is working fine when I remote login to 
> the server and run the script.
>
> Now I want to write a Perl script on my local machine using Net::Telnet to 
> remote run the script on the server. The script on the server can be called 
> and run successfully until it attempts to open an Excel file. The error is 
> shown as the following.
>
> ===========================
> OLE exception from "Microsoft Excel":
>
> Microsoft Excel cannot access the file
> 'F:\Apps\Delta_rpt\xxxx_template.xlsx'. 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" at F:\Apps\Delta_rpt\pm_delta.pl line 320
> ===========================
>
> There is no such error if I use remote desktop to the server and run the 
> script. I am wondering if Win32::OLE does not support the remote call?

is this F: drive a network mapping or a fixed disk?

If it is a network drive, then it is very likely that when calling
this code from a remote host with Net::Telnet (you are aware this is
very insecure, of course) then the mapping is not there. That would
explain the error.

-- 
groet,
natxo

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to