Rows("6:6").Select ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell #### use strict; use warnings; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Excel'; use Win32::OLE::Variant; use Win32::OLE::NLS qw(:LOCALE :DATE); $Win32::OLE::Warn = 3; # Die on Errors. my $Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); $Excel->{Visible} = 1; my $Book = $Excel->Workbooks->Add(); my $row = 6; $Excel->Worksheets(1)->HPageBreaks->Add({ Before => $Excel->Worksheets(1)->Range("A$row") });