Excel Data Extractor crawl an Excel file and extracts the header and data of a table inside.
$ composer require valentinloiseau/excel-data-extractor$crawler = new Crawler('path/to/my/file.xlsx');
# Make some adjustments
Configuration::setLineAttributesFromHeader(true);
$table = $crawler->getTable();
$headers = $table->getHeaders();
$lines = $table->getLines();Call the following static methods to class Configuration:
Default to true.
Set to false to get all table lines, included blank lines.
Default to false.
By default, cell values are stored in the corresponding string column index property, eg: if the first cell value of current line if 'bar' the result will be 'A' => 'bar'.
For the same example if this configuration is set to true and the guessed column name is 'foo' the result will be 'foo' => 'bar'.