use strict; use warnings; use Win32::OLE; #get an existing app or create a new one my $ex = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OL +E->new('Excel.Application' , 'Quit'); $ex->{DisplayAlerts}=0; #open workbook my $book = $ex->Workbooks->open('D:\Profiles\in2228c\Desktop\TIN\Cr_an +alysis.xls'); #Activating worksheet my $sheet = $book->Worksheets("Sheet1"); my $range1=$sheet->range('A1'); $sheet->copy($range1); my $range2=$sheet->range('A2'); $range2=$sheet->paste($range2); $book->SaveAs('D:\Profiles\in2228c\Desktop\TIN\Cr_analysis.xls');
In reply to Re^2: Copy paste rows in excel
by Ankit.11nov
in thread Copy paste rows in excel
by Ankit.11nov
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |