Hi guys, I have a situation where I'm processing a few CSV files as background jobs and on one of the files, the headers are actually on Line 4.
I know I can change the startRow in the config, however, I only need it changed for one particular file. Is there anyway to set this as part of Excel::load() or anything?
Any help would be much appreciated.
Found a way round this by setting config dynamically before calling Excel::load():
config(['excel.import.startRow' => 4]);
After pulling my hair out for a couple of hours, with laravel 4.2 and trying to get this to work, I poured over the source code and in case it helps someone:
Config::set('excel::import.startRow', 4);
does the trick; notice the :: instead of .
Most helpful comment
Found a way round this by setting config dynamically before calling
Excel::load():config(['excel.import.startRow' => 4]);