/** * * @return void */ private function ProcessFileContent() { $objPHPExcel = PHPExcel_IOFactory::load($this->file); // Loop over all worksheets foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) { try { // First check if there is an interface with the same id as the worksheet $ifc = InterfaceObject::getInterfaceByLabel($worksheet->getTitle()); $parseWithIfc = true; } catch (Exception $e) { $this->logger->warning("No interface found with name as title of worksheet '{$worksheet->getTitle()}'. Parsing file without interface"); $parseWithIfc = false; } if ($parseWithIfc) { $this->ParseWorksheetWithIfc($worksheet, $ifc); } else { $this->ParseWorksheet($worksheet); } } }