elibyy / spout
PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way
Requires
- php: >=5.4.0
- ext-xmlreader: *
- ext-zip: *
Requires (Dev)
- phpunit/phpunit: ^4.8.0
Suggests
- ext-iconv: To handle non UTF-8 CSV files (if "php-intl" is not already installed or is too limited)
- ext-intl: To handle non UTF-8 CSV files (if "iconv" is not already installed)
This package is auto-updated.
Last update: 2024-10-29 05:10:49 UTC
README
Spout is a PHP library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way. Contrary to other file readers or writers, it is capable of processing very large files while keeping the memory usage really low (less than 3MB).
Join the community and come discuss about Spout:
Documentation
Full documentation can be found at http://opensource.box.com/spout/.
Requirements
- PHP version 5.4.0 or higher
- PHP extension
php_zip
enabled - PHP extension
php_xmlreader
enabled
Running tests
On the master
branch, only unit and functional tests are included. The performance tests require very large files and have been excluded.
If you just want to check that everything is working as expected, executing the tests of the master
branch is enough.
If you want to run performance tests, you will need to checkout the perf-tests
branch. Multiple test suites can then be run, depending on the expected output:
phpunit
- runs the whole test suite (unit + functional + performance tests)phpunit --exclude-group perf-tests
- only runs the unit and functional testsphpunit --group perf-tests
- only runs the performance tests
For information, the performance tests take about 30 minutes to run (processing 1 million rows files is not a quick thing).
Support
You can ask questions, submit new features ideas or discuss about Spout in the chat room:
Copyright and License
Copyright 2017 Box, Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.