use Win32; use Win32::OLE; use Win32::OLE::Const 'Microsoft Excel'; #### $excel = Win32::OLE->new('Excel.Application', 'Quit') or ($excel_res = 0, $ew_message = "Could not create excel object"); $workbook = $excel->Workbooks->Open($new_finnpower_full) or ($workbook_res = 0, $ew_message = "Could not open excel workbook");