Adrien Loison
Adrien Loison
Some softwares do add this repeated columns cell for some reasons. Some versions of Excel for instance add this. I'm not sure why... I made the change but ended up...
So, I looked at the specs but there's nothing regarding what the behavior should be. This means that a table-cell with 1023 repeated columns actually represents 1024 cells! The way...
The main problem implementing `Countable` is that you have to go through the entire XML file storing the sheet's structure to get the count. And if you want the values,...
I did a quick performance test to see how long it would take to get a count. For an ODS file containing 1 million rows (and 3 million cells), it...
For reference, here is my code: ``` php function usingDOMDocument($filePath) { $dom = new DOMDocument(); $dom->load($filePath); $nodes = $dom->getElementsByTagNameNS('urn:oasis:names:tc:opendocument:xmlns:table:1.0', 'table-row'); return $nodes->length; } function usingXMLReader($filePath) { $xmlReader = new XMLReader();...
BTW there is no other way to show a progress bar, you need to get the count first :)
The implementation itself is not difficult. What's more difficult is telling people that getting the row count can be slow. It creates confusion as people usually thinks that's it's a...
Note that @Tersoal's solution for CSV does not take into account values that contain line breaks. For a proper count, there's no other way than parsing every row.
@Tersoal No worries, the comment was more a note for myself that it was not fully compliant. The other implementations look good though :)
Thanks @stevesweets ! Most likely, this won't be merged until v3 is released. v3 should make it easier to work with formulas. But I'll keep the PR open, as a...