in reply to Re: Calling macro from another workbook using perl
in thread Calling macro from another workbook using perl

Thanks for your reply. here is my modified code. and yes,as per your suggestion i tried to do it manually and its working.But,same i am trying same to do with script,its not working.
use Win32::OLE::Variant; use strict; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Excel'; $Win32::OLE::Warn = 3; my $Excel = Win32::OLE->GetActiveObject('Excel.Application')||Win32::O +LE->new('Excel.Application', 'Quit'); my $Book = $Excel->Workbooks->Open( "F:\\project\\report1.xlsx" ); my $Book = $Excel->Workbooks->Open( "F:\\project\\report1.xlsm" ); # O +pen Workbook needing the macro: Macro1 my $Sheet = $Book->Worksheets(1); #work on sheet1 $Excel->Run("report1.xlsm!Deletebrows"); #Calling on the Macro from ma +cro workbook. $Excel->Run("report1.xlsm!FillEmptyCellWithZero"); $Book->Save; $Book->Close;