valentinloiseau / excel-data-extractor
Excel Data Extractor crawl an Excel file and extracts the header and data of a table inside.
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
pkg:composer/valentinloiseau/excel-data-extractor
Requires
- php: ^7.2
- phpoffice/phpspreadsheet: ^1.10
This package is auto-updated.
Last update: 2025-11-22 22:59:59 UTC
README
Excel Data Extractor crawl an Excel file and extracts the header and data of a table inside.
Installation
$ composer require valentinloiseau/excel-data-extractor
Usage
$crawler = new Crawler('path/to/my/file.xlsx'); # Make some adjustments Configuration::setLineAttributesFromHeader(true); $table = $crawler->getTable(); $headers = $table->getHeaders(); $lines = $table->getLines();
Configuration
Call the following static methods to class Configuration:
setIgnoreBlankLines
Default to true.
Set to false to get all table lines, included blank lines.
setLineAttributesFromHeader
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'.