Commit Graph
24 Commits
Author SHA1 Message Date
Adrien Loison 16a2f91a22 Cell indexes not being respected when rendering row
Fixes #682
When calling `Row::setCellIndex`, it's possible to create a Row with holes.
Instead of iterating over existing cells of a Row, we should instead use the cell indexes (from 0 to max cell index).
2019-09-28 14:02:23 +00:00
Adrien Loison 2716d7eeed [PHP 7.4] Updated way to disable the fgetcsv/fputcsv escape character
From PHP 7.4, the recommended way to disable the escape character for fgetcsv() and fputcsv() is an empty string, instead of "\0".
Discussed here: https://github.com/php/php-src/pull/3515
2019-07-21 23:15:34 +02:00
Adrien Loison 1bbfd45b82 Support for missing styles XML file in XLSX
Some files don't have a "styles.xml" file. Excel supports these files, Spout should do too.
2019-07-20 16:48:51 +02:00
Adrien Loison 6c4086cf97 Fix reading of 1904 dates option
Whether the spreadsheet is using 1904 dates or not is controlled by a XML property. Its value can be the string "false" that is not mapped to the boolean "false" but to the boolean "true"... Therefore Spout was previously using the wrong date system when this property was set.
2019-06-04 09:36:51 +02:00
Adrien Loison a296f73a98 Fix Github icon in docs 2019-05-24 10:12:35 +02:00
Adrien Loison 0f0bf64802 Merge branch 'master' into develop_3.0 2019-05-24 09:30:41 +02:00
Adrien Loison 9d33fcdd00 Update FAQ 2019-05-24 09:24:34 +02:00
Adrien Loison 4ff9717b0a Update FAQ in docs 2019-05-23 09:00:46 +02:00
Adrien Loison c62177f0e4 Move documentation from gh-pages branch to 'docs' folder
To prepare the migration to 3.0, we need to change the location where the documentation is generated from.
Having a gh-pages branch makes it hard to synchronize the code and the docs. Having a "docs" folder in the repo itself simplifies this.
2019-05-22 09:45:45 +02:00
Adrien Loison 3beaa32021 Fix docblock 2019-05-21 19:43:54 +02:00
Adrien Loison 5ce5a488d1 Force UTF-8 encoding in htmlspecialchars 2019-05-21 19:37:09 +02:00
Adrien Loison 69b0fb9eaf Add methods to SheetInterface
The SheetInterface was missing methods common to all Sheets (getIndex, getName, isActive, isVisible).
2019-05-17 21:38:29 +02:00
Adrien Loison 40ee386edd Add helper functions to create specific readers and writers
Removed the `ReaderEntityFactory::createReader(Type)` method and replaced it by 3 methods:
- `ReaderEntityFactory::createCSVReader()`
- `ReaderEntityFactory::createXLSXReader()`
- `ReaderEntityFactory::createODSReader()`

This has the advantage of enabling autocomplete in the IDE, as the return type is no longer the interface but the concrete type. Since readers may expose different options, this is pretty useful.

Similarly, removed the `WriterEntityFactory::createWriter(Type)` method and replaced it by 3 methods:
- `WriterEntityFactory::createCSVWriter()`
- `WriterEntityFactory::createXLSXWriter()`
- `WriterEntityFactory::createODSWriter()`

Since this is a breaking change, I also updated the Upgrade guide.
Finally, the doc is up to date too.
2019-05-17 21:22:03 +02:00
Adrien Loison 6104d41857 Add tests runs on PHP 7.3 in Travis 2019-05-17 13:37:25 +02:00
Adrien Loison 4260c46b11 Update documentation for 3.0 2019-05-17 13:25:49 +02:00
Adrien Loison 4a9d0398ad Update Reader/WriterEntityFactory
Add `WriterEntityFactory::createWriterFromFile`, working like `ReaderEntityFactory::createReaderFromFile` (guessing writer type from file name).
Use static functions when needed.
2019-05-17 13:22:27 +02:00
Adrien Loison 171a2fab10 Fix test failure message 2019-02-02 09:55:16 +01:00
Adrien Loison 71cf0fe339 Fix sheet name escaping
Sheet names are stored as attributes of an XML entity. We therefore need a different escaping strategy, escaping quotes.
2019-01-26 16:14:15 +01:00
Adrien Loison 195b0d4bda Upgrade to 3.0 guide 2018-06-04 08:46:37 +02:00
Adrien Loison f7c483adbd Better support for errored cells 2018-06-03 22:31:24 +02:00
Adrien Loison 1b64a06fbe Move ReaderFactory into Common/Creator 2018-06-03 21:13:38 +02:00
Adrien Loison d25a4ebd6d Add docs to .gitattributes 2018-06-03 21:08:21 +02:00
Adrien Loison e83ac423dc Force PHP 7.1 2018-06-03 20:43:49 +02:00
Adrien Loison 799ad93d23 Force UTF-8 encoding in htmlspecialchars 2018-05-09 22:56:06 +02:00