I would like to read first row without createRowIterato interface as first line, in XLSX file, belongs to my database table fields. So I would like to read them first and want to put it in fields array.
I am using sample code at first level:
$workbook = SpreadsheetParser::open('myfile.xlsx');
$myWorksheetIndex = $workbook->getWorksheetIndex('sheet1');
//MY REQUIREMENT
//Here I want to get first row as they will be treated as my table fields.
foreach ($workbook->createRowIterator($myWorksheetIndex) as $rowIndex => $values) {
var_dump($rowIndex, $values);
}
Any help would be great.