I am using the following code to create an excel file on the share on the remote win2007 professional.
However I am able to create a word file on the same machine. I am just not sure if I am missing anything specific to Excel implementation of OLE objects.
Please help
Code:
use Win32::OLE qw(in with);
use Win32::OLE::Const;
use Win32::OLE::Variant;
use Data::Dumper;
use Win32::NetResource
my $Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application','Quit');
print $Excel->{Version};
my $Book = $Excel->Workbooks->Add() or die $!;
my $filename = "\\\\192.168.20.41\\SHARE\\Test1.xls";
$Book->SaveAs($filename) or die $!; # Dies here
Please help
Comment