I read an xlsx- or csv-file with OpenSpout and want to read the first row (column-titles) before further processing. I get the rowIterator like this:
$iterator = $reader->getSheetIterator()->current()->getRowIterator();
The key is at 0 at the beginning. I try to move the key to 1 with
$iterator->next();
but I get the error
Fatal error: Uncaught Error: Data must be loaded before reading…
What am I missing here?