I am using akeneo-labs spreadsheet parser library to extract data from an xlsx file.
use Akeneo\Component\SpreadsheetParser\SpreadsheetParser; $workbook = SpreadsheetParser::open('myfile.xlsx'); $myWorksheetIndex = $workbook->getWorksheetIndex('myworksheet'); foreach ($workbook->createRowIterator($myWorksheetIndex) as $rowIndex => $values) { var_dump($rowIndex, $values); }
Actually, you can get the value by the column index in the loop, is it possible to get the value by the column name instead?
source share