vakata / spreadsheet
Simple spreadsheet reader/writer supporting XLS (read-only), XLSX and CSV files
Installs: 8 555
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 1
Requires
- php: ^8.1
- ext-simplexml: *
- ext-zip: *
README
Simple spreadsheet reader/writer supporting XLS (read-only), XLSX, XML and CSV files. The classes try not to load all the data at once so that fairly large files are supported using iterators.
Install
Via Composer
$ composer require vakata/spreadsheet
Usage
// you can also write to browser or to stream (additional options are available for each format) foreach (\vakata\spreadsheet\Writer::toFile('test.xlsx')->fromArray([ [1,"asdf","2022-02-10"], [2,"test","2010-11-10"] ]); // you can also read from stream foreach (\vakata\spreadsheet\Reader::fromFile('test.xlsx') as $k => $row) { var_dump($row); } // or var_dump(\vakata\spreadsheet\Reader::fromFile('test.xlsx')->toArray());
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email github@vakata.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.