Files
faveo/vendor/maatwebsite/excel/docs/import/config.md
Manish Verma 76e85db070 update 1.0.8.0
Commits for version update
2016-10-17 12:02:27 +05:30

639 B

Import by Config

When using advanced Excel files (e.g. without any heading columns), it can be complicated to import these. ->byConfig() will help you handle this problem.

Inside excel::import.sheets config you can find an example.

Excel::load('file.xls')->byConfig('excel::import.sheets', function($sheet) {

    // The firstname getter will correspond with a cell coordinate set inside the config
    $firstname = $sheet->firstname;

});

Note: if you are using multiple sheets. ->byConfig will loop through all sheets. If these getters are only exist on one sheet, you can always use ->selectSheets().