public function fire()
 {
     parent::fire();
     $groups = $this->getGroups();
     if ($this->worksheetTitle === null) {
         foreach ($groups as $group) {
             $this->syncGroup($group);
         }
     } else {
         if (in_array($this->worksheetTitle, $groups)) {
             $this->syncGroup($this->worksheetTitle);
         } else {
             $this->error("Group {$this->worksheetTitle} doesn't exist");
         }
     }
 }
 public function fire()
 {
     parent::fire();
     $spreadsheet = $this->spreadsheetManager->getSpreadsheet();
     $worksheetFeed = $spreadsheet->getWorksheets();
     if ($this->worksheetTitle === null) {
         // import all worksheets
         foreach ($worksheetFeed as $worksheet) {
             if ($worksheet->getTitle() !== LaravelLang::TEMPLATE_ID) {
                 $this->importWorksheet($worksheet);
             }
         }
     } else {
         // import single worksheet
         $worksheet = $worksheetFeed->getByTitle($this->worksheetTitle);
         $this->importWorksheet($worksheet);
     }
     $this->checkEmpty();
 }