use strict; use Win32::OLE; # Open excel. my $excel = Win32::OLE->new("Excel.Application", 'Quit'); # Create a workbook. my $excelBook = $excel->Workbooks->Add; # Enumerate the sheets in the workbook (sheet1,sheet2,sheet3 by default). my $sheets = Win32::OLE::Enum->new($excelBook->Worksheets()); #Iterate the sheets using the All() function. foreach my $sheet ($sheets->All()) { print $sheet->name() . "\n"; }