use strict; use warnings; use Win32::OLE; use Win32::OLE::Const 'Microsoft Excel'; my $xl = Win32::OLE->new('Excel.Application'); $xl->{Visible} = 1; my $wb = $xl->Workbooks->Add; for my $nSht (2..$wb->Sheets->{Count}) { $wb->Sheets(2)->Delete; } my $sht = $wb->Sheets(1); for my $col ('A'..'C') { for my $row (1..3) { my $rng = $col . $row; $sht->Range($rng)->{Value} = $rng; } } $sht->Range("B2")->Insert({Shift=>xlDown});