my $excel = Win32::OLE->new('Excel.Application'); my $book = $excel->Workbooks->Open("c:\\temp\\sale.xls"); my $sheet = $book->Worksheets(1); with ($sheet->PageSetup, CenterFooter => "&F")