Commit Graph
21 Commits
Author SHA1 Message Date
Adrien Loison dbdf5f7f38 [ODS] Add support for whitespaces inside <text:span>
The `<text:p>` node can contain the string value directly or contain child elements. In this case, whitespaces contain in the child elements should be replaced by their XML equivalent:
 - space => `<text:s />`
 - tab => `<text:tab />`
 - line break => `<text:line-break />`

@see https://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1415200_253892949
2019-10-27 20:14:51 +01: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
madflow 8a1c48b6b0 rename EntityFactory for writers and readers #526 2018-09-03 11:15:09 +02:00
Gabriel Caruso 4c7adbb33f Refactoring tests 2017-12-15 10:09:18 +01:00
Gabriel Caruso 0efdf48119 Support PHPUnit 6 2017-11-27 00:24:13 +01:00
Adrien Loison 102e17159c Make ODS reader return Row object 2017-11-19 01:36:18 +01:00
Adrien Loison a665b974fa Make CSV reader return Row objects 2017-11-18 19:08:27 +01:00
Adrien Loison 3851e05f83 Remove @expectedException annotation 2017-11-05 02:21:09 +01:00
Adrien Loison b968513cb9 Fix code style 2017-09-06 00:33:43 +02:00
Adrien Loison 740fcfb8c1 Fix code before applying PHP CS Fixer 2017-09-06 00:33:43 +02:00
Adrien Loison 9f80ece73f Minor fixes for tests (#406) 2017-04-15 23:33:50 +02:00
Adrien Loison 2fafb63115 ODS Reader should support num-rows-repeated for non empty rows (#335) 2016-10-17 10:51:12 -07:00
Adrien Loison 0978d340f0 Option to keep empty rows (#331)
* Add option to preserve empty rows when reading an XLSX file
* Add option to preserve empty rows when reading a CSV file
* Add option to preserve empty rows when reading an ODS file
2016-10-17 10:20:02 -07:00
madflow cd38ba093e Fix #245 (#246) 2016-06-08 09:50:00 -07:00
Adrien Loison 104cd9b811 Option to return formatted dates instead of PHP objects (#226)
When reading spreadsheets, Spout should be able to return formatted dates, as shown when opened with Excel for instance.
It currently only returns DateTime/DateInterval objects, making it impossible to read + write, as the Writer does not accept objects.
2016-05-20 16:08:35 -07:00
madflow 2d923c7e46 Fix issue #218 (#222) 2016-05-20 09:32:47 -07:00
madflow 6f0f7c9690 Fix #195 2016-04-06 22:00:47 +02:00
madflow 2b1160bb33 Tests for #184 2016-03-19 11:34:31 +01:00
Adrien Loison d2ac54c578 Custom stream wrapper support
Added support for custom stream wrappers, such as "fly" or "s3".
Support is determined per reader.
2016-03-18 17:09:13 -07:00
Adrien Loison 818ec2488c Support all ODS cell types
Including:
- date / time
- currency
- percentage
- void

And improved support for boolean
2015-09-02 14:03:38 -07:00
Adrien Loison e4154dfdc3 ODS Reader
Spout can now read ODS files.
It's on par with the XLSX reader. The only difference is that the row iterator cannot be rewound.
It supports the different output formats from LibreOffice and Excel, skipping extra rows/cells if needed.
2015-09-01 10:53:49 -07:00