You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to read first row without createRowIterator 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 your sample code at first level:
use Akeneo\Component\SpreadsheetParser\SpreadsheetParser;
use Akeneo\Component\SpreadsheetParser\Xlsx\XlsxParser;
$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 appreciated.
Thanks, Sumit
The text was updated successfully, but these errors were encountered:
I would like to read first row without createRowIterator 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 your sample code at first level:
use Akeneo\Component\SpreadsheetParser\SpreadsheetParser;
use Akeneo\Component\SpreadsheetParser\Xlsx\XlsxParser;
Any help would be appreciated.
Thanks, Sumit
The text was updated successfully, but these errors were encountered: