use strict; use warnings; use Win32::OLE; use Win32::OLE::Const 'Microsoft Excel'; my $xl = Win32::OLE->new('Excel.Application'); $xl->{Visible} = 1; my $nShtsOld = $xl->{SheetsInNewWorkbook}; $xl->{SheetsInNewWorkbook} = 1; my $wb = $xl->Workbooks->Add; $xl->{SheetsInNewWorkbook} = $nShtsOld; my $sht = $wb->Sheets(1); $sht->Cells(1, 1)->{Value} = 'a'; $sht->Cells(2, 2)->{Value} = 'b'; $sht->Cells(3, 1)->{Value} = 'c'; $sht->Cells(3, 2)->{Value} = 'c'; $sht->Cells(1, 2)->Delete({Shift=>xlUp});