| 1 |
# OpenSpout |
| 2 |
|
| 3 |
[](https://packagist.org/packages/openspout/openspout](https://packagist.org/packages/openspout/openspout](https://packagist.org/packages/openspout/openspout) |
| 4 |
[](https://github.com/openspout/openspout/actions/workflows/ci.yml](https://github.com/openspout/openspout/actions/workflows/ci.yml](https://github.com/openspout/openspout/actions/workflows/ci.yml) |
| 5 |
[](https://codecov.io/gh/openspout/openspout?branch=main](https://codecov.io/gh/openspout/openspout?branch=main](https://codecov.io/gh/openspout/openspout?branch=main) |
| 6 |
[](https://packagist.org/packages/openspout/openspout](https://packagist.org/packages/openspout/openspout](https://packagist.org/packages/openspout/openspout) |
| 7 |
|
| 8 |
OpenSpout is a community driven fork of `box/spout`, a PHP library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way. |
| 9 |
Unlike other file readers or writers, it is capable of processing very large files, while keeping the memory usage really low (less than 3MB). |
| 10 |
|
| 11 |
## Documentation |
| 12 |
|
| 13 |
Documentation can be found at [](https://openspout.readthedocs.io/en/latest/https://openspout.readthedocs.io/en/latest/](https://openspout.readthedocs.io/en/latest/](https://openspout.readthedocs.io/en/latest/). |
| 14 |
|
| 15 |
## Requirements |
| 16 |
|
| 17 |
* PHP version 7.3 or higher |
| 18 |
* PHP extension `php_zip` enabled |
| 19 |
* PHP extension `php_xmlreader` enabled |
| 20 |
|
| 21 |
## Upgrade from `box/spout` |
| 22 |
|
| 23 |
1. Replace `box/spout` with `openspout/openspout` in your `composer.json` |
| 24 |
2. Replace `Box\Spout` with `OpenSpout` in your code |
| 25 |
|
| 26 |
## Upgrade guide |
| 27 |
|
| 28 |
Version 3 introduced new functionality but also some breaking changes. If you want to upgrade your Spout codebase from version 2 please consult the [](UPGRADE-3.0.mdUpgrade guide](UPGRADE-3.0.md](UPGRADE-3.0.md). |
| 29 |
|
| 30 |
## Running tests |
| 31 |
|
| 32 |
The `main` branch includes unit, functional and performance tests. |
| 33 |
If you just want to check that everything is working as expected, executing the unit and functional tests is enough. |
| 34 |
|
| 35 |
* `phpunit` - runs unit and functional tests |
| 36 |
* `phpunit --group perf-tests` - only runs the performance tests |
| 37 |
|
| 38 |
For information, the performance tests take about 10 minutes to run (processing 1 million rows files is not a quick thing). |
| 39 |
|
| 40 |
> Performance tests status: [](https://travis-ci.org/box/spout](https://travis-ci.org/box/spout](https://travis-ci.org/box/spout) |
| 41 |
|
| 42 |
## Copyright and License |
| 43 |
|
| 44 |
This is a fork of Box's Spout library: https://github.com/box/spout |
| 45 |
|
| 46 |
Code until and directly descending from commit [](https://github.com/openspout/openspout/commit/cc42c1d29fc5d29f07caeace99bd29dbb6d7c2f8`cc42c1d`](https://github.com/openspout/openspout/commit/cc42c1d29fc5d29f07caeace99bd29dbb6d7c2f8](https://github.com/openspout/openspout/commit/cc42c1d29fc5d29f07caeace99bd29dbb6d7c2f8) |
| 47 |
is copyright of _Box, Inc._ and licensed under the Apache License, Version 2.0: |
| 48 |
|
| 49 |
https://github.com/openspout/openspout/blob/cc42c1d29fc5d29f07caeace99bd29dbb6d7c2f8/LICENSE |
| 50 |
|
| 51 |
Code created, edited and released after the commit mentioned above |
| 52 |
is copyright of _openspout_ Github organization and licensed under MIT License. |
| 53 |
|
| 54 |
https://github.com/openspout/openspout/blob/main/LICENSE |
| 55 |
|