As swl suggested, you can read/write data as a range.
poj#!perl use strict; use Win32::OLE; use Win32::OLE::Const "Microsoft Excel"; use Data::Dump 'pp'; $Win32::OLE::Warn = 3; my $Excel =Win32::OLE->new('Excel.Application'); $Excel->{Visible} = 1; my $Book = $Excel->Workbooks->Open('c:/temp/Book1.xlsx'); my $Sheet = $Book->Worksheets("Sheet1"); my $begincol = 2; my $beginrow = 6; # B6 my $endcol = 4; my $endrow = 10;# D10 my $c1 = $Sheet->Cells($beginrow,$begincol); my $c2 = $Sheet->Cells($endrow,$endcol); my $data = $Sheet->Range($c1,$c2)->Value; pp $data; $Sheet->Range("A16:C20")->{'Value'} = $data; $Excel->Quit(); undef $Excel;
In reply to Re: Increase speed of nested loop Win32 Excel Manipulation
by poj
in thread Increase speed of nested loop Win32 Excel Manipulation
by Sasuke300
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |