public function getOnSheetCreate() { if ($this->on_sheet_create === null) { $this->on_sheet_create = function (LaravelExcelWorksheet $sheet) { $sheet->fromArray($this->getData(), null, 'A1', false, false); }; } return $this->on_sheet_create; }