Commit Graph

2261 Commits

Author SHA1 Message Date
Mark Baker ab1c6e53b6
Number format with colours (#1080)
* Fix number formatting using named colours in format masks

* Handle number formatting with ful substitution of values by a string

* Update changelog
2019-07-14 19:36:34 +02:00
Mark Baker a91acec5d9
Countif strict comparison (#1078)
* Stricter-typed comparison testing in COUNTIF() and COUNTIFS() evaluation [Issue #1046](https://github.com/PHPOffice/PhpSpreadsheet/issues/1046)

* Codestyle

* Codestyle

* Codestyle in tests
2019-07-14 16:22:31 +02:00
MarkBaker 36135a4c05 Use empty to check for empty array 2019-07-14 13:36:23 +02:00
MarkBaker 6500128451 Update calculation functions implemented lists 2019-07-14 13:12:43 +02:00
Juluan 7505638dc8 Fix 1055 (#1076)
* Fix #1055 : Make hlookup require ordered list only if asking for not exact match

* Added test for #1055
2019-07-14 12:56:17 +02:00
Zdeněk Drahoš 42fc71f314 Calculation/Statistical :: Add MAXIFS, MINIFS, COUNTIFS and Remove MINIF, MAXIF (#1059)
* #1056 - replace invalid minif/maxif functions by not implemented minifs/maxifs

minif/maxif is not support in Excel, Google Spreadsheets, Libreoffice
https://support.office.com/en-us/article/excel-functions-alphabetical-b3944572-255d-4efb-bb96-c6d90033e188#bm13

* #1056 - implement minifs/maxifs

Copy-pasted sumifs...
https://github.com/PHPOffice/PhpSpreadsheet/blob/1.8.1/src/PhpSpreadsheet/Calculation/MathTrig.php#L1254

* #1056 - implement countifs

* #1056 - fix code style

composer check
composer fix

* #1056 - update changelog
2019-07-14 12:55:42 +02:00
Mr Maker 22190615ce When <br> appears in a table cell, set the cell to wrap. (#1070)
* When <br> appears in a table cell, set the cell to wrap.

If the cell is not set to wrap, it appears as a single line when first
displayed in Excel, although editing the cell will cause Excel to wrap
it.

* fix whitespace

Upstream has a coding standard that includes whitespace
2019-07-12 07:53:07 +02:00
Mark Baker bf59cf0cbc
Html cellwrapping (#1075)
* When <br> appears in a table cell, set the cell to wrap.

If the cell is not set to wrap, it appears as a single line when first
displayed in Excel, although editing the cell will cause Excel to wrap
it.

* fix whitespace

Upstream has a coding standard that includes whitespace

* Add Unit tests for cell wrapping

* Update changelog
2019-07-12 07:52:03 +02:00
Mark Baker de3f948b27
Coupnum fix (#1069)
* New Unit Tests for COUPNUM()

* COUPNUM should not return zero when settlement is in the last period

* Additional tests and fixes for COUPNCD() and COUPPCD() functions

* Additional tests and fixes for COUPNCD() and COUPPCD() functions
2019-07-10 22:41:28 +02:00
Mark Baker 0ea97f14e1
Fixes to coupon functions (#1068)
* New Unit Tests for COUPNUM()

* COUPNUM should not return zero when settlement is in the last period

* Additional tests and fixes for COUPNCD() and COUPPCD() functions
2019-07-10 21:22:16 +02:00
MarkBaker 38e71a1210 Fix Documentation type 2019-07-09 19:39:12 +02:00
MarkBaker 0c1346a195 Update changelog with fixes implemented in 1.8.2 release 2019-07-08 23:21:25 +02:00
Mark Baker 094933164d
Ods reader fix for property reader when none set (#1064)
* Fix for Ods Property Reader when no core properties are defined

* Fix for Ods Property Reader when no meta properties are defined
2019-07-08 22:35:08 +02:00
Mark Baker d8047b071b
Basic unit test and fix for loading data validations from xlsx file (#1063) 2019-07-08 19:55:14 +02:00
MarkBaker d4eab49815 case-insensitive charset name in xml scanner 2019-07-03 18:34:11 +02:00
rtek 6ab969e9cc Allow XmlScanner to correctly restore libxml entity_loader setting (#1050)
XmlScanner was not restoring libxml_disable_entity_loader since
destruct was not being called until script shutdown. This is because
the shutdown handler required an XmlScanner instance.

Also fix an unrelated bug where the UTF-8 encoding test was
case sensitive.
2019-07-03 09:53:43 +02:00
MarkBaker 352c7002fe Allow nullable theme for Xlsx Style Reader class 2019-07-01 22:46:51 +02:00
Mark Baker d645ed92d5
Allow nullable theme for Xlsx Style Reader class (#1044) 2019-07-01 20:59:34 +02:00
Mark Baker 0e6238c69e
CVE-2019-12331 (#1041)
* Detect doubly-encoded xml to hide XXE attacks
Correct use of LibXml_Disable_Entity_Loader

* New test for double-encoded xml in security scanner
2019-07-01 00:55:25 +02:00
Mark Baker 1e711541f1
Refactoring xlsx reader (#1033)
Start work on breaking up monolithic Reader and Writer classes into dedicated subclasses to make maintenance work easier
2019-06-30 23:42:25 +02:00
Mark Baker e884271dc2
Scrutinizer resolutions (#1032)
* list($ac, $ar) = sscanf($a, '%[A-Z]%d'); to appease scrutinizer, which complains about ($a, '%[A-Z]%d')

* Fix a docblock error

* More scrutinizer happiness
2019-06-23 22:13:49 +02:00
Mark Baker 591f1e0c70
Scrutinizer resolutions (#1031)
* list($ac, $ar) = sscanf($a, '%[A-Z]%d'); to appease scrutinizer, which complains about ($a, '%[A-Z]%d')

* Fix a docblock error
2019-06-23 19:19:45 +02:00
Mark Baker 14e980625f
Yet more minor improvements (#1030) 2019-06-23 16:50:45 +02:00
Mark Baker 1b00fac6ad
Minor improvements (#1029)
* Another collection of minor improvements

* Fix broken test

* And style

* Seriously?!? The order of returned types declared in a docblock is majorly important?
2019-06-22 23:15:14 +02:00
Mark Baker 2adaad3b01
Minor improvements (#1028)
* Initial tweaks

* Move signatures for abstract BaseReader methods to the IReader interface

* Appease the great whitespace gods
2019-06-22 21:24:51 +02:00
Gowrav Vishwakarma ca56fd258c Typo (#1007)
Cell B5 is about to get the changs btw
2019-06-14 08:32:19 +02:00
Mark Baker 71f3631cfb
Rectorification (#1010)
* A few loose to strict comparisons

* More loose to strict comparisons

* Revert accidental composer hacks that shouldn't have been committed
2019-06-14 08:31:27 +02:00
Mark Baker 5fd954d2c2
Improve test code (#1003)
* Enhancements suggested by scrutiniser

* Styling

* Minor additional tests datatype fixes
2019-06-10 18:00:15 +02:00
Mark Baker e69b2ccf43
Scrutiniser recommendations (#1004) 2019-06-10 17:59:44 +02:00
Mark Baker 6c25b6f422
Refactor Xlsx Properties Reader code into a separate class (#1001)
* Unit tests for refactoring Spreadsheet properties
* Refactor Xlsx Properties Reader code into a separate class
2019-06-10 16:44:55 +02:00
Mark Baker dd656b4c53
Improve test code (#1002)
* Enhancements suggested by scrutiniser

* Styling
2019-06-10 01:48:06 +02:00
MarkBaker d6018a273e Codestyle fixes in tests.... spawn of the devil 2019-05-30 12:23:25 +02:00
MarkBaker 867237f567 Codestyle fixes 2019-05-30 12:14:05 +02:00
MarkBaker 9ba96efc97 Still test against 5.6, but with allowed failures, and skip tests explicitly for features that require PHP >= 7.0.0 2019-05-30 12:11:49 +02:00
MarkBaker 561852e341 Still test against 5.6, but with allowed failures 2019-05-30 12:00:41 +02:00
MarkBaker fc78cd5422 Minimum PHP 7.0 and updated travis 2019-05-30 11:59:01 +02:00
kraser 906bdc613c Fix failure when parsing xlsx with drawing having double (redefined) … (#945)
* Fix failure when parsing xlsx with drawing having double (redefined) attributes

* Fix failure when parsing xlsx with drawing having double (redefined) attributes
2019-05-30 11:42:00 +02:00
Aleksandr Borovikov 53ac682ba7 Fix #956: Incorrectly handled backslash-escaped space characters within number formats (#957)
Backslash-escaped space characted sometimes not converted to quoted strings, so formatted string contains extra slashes.
2019-05-30 11:37:48 +02:00
MarkBaker 85dfd8b00b Style fix 2019-05-30 10:57:37 +02:00
Mofasa 0947427d9f Allow to get current iterator position (#980) 2019-05-30 10:42:18 +02:00
AlexPravdin ebc0b56959 Fix #853 when loading and saving XLSX file with empty drawing cause c… (#882)
* Fix #853 when loading and saving XLSX file with empty drawing cause corrupted output file. Store empty drawing as unparsed entity and save it as is when saving the file.

* Fix code style
2019-05-30 10:38:03 +02:00
Harshvardhan Malpani e096391f54 NamedRanges with ' in name wont get wiped (#988)
Example: 'attr_values'!$D$3:$D$49
earlier this would probably be flushed and getNamedRanges() would not show it because sheet "'attr_values'" does not exist. It should be "attr_values"
2019-05-30 10:34:58 +02:00
MarkBaker 7c3465851c Eliminate duplicate if test 2019-05-30 10:21:32 +02:00
MarkBaker c783c3443e Updates to changelog 2019-05-30 10:06:05 +02:00
MarkBaker fd7d19f90b Updates to changelog 2019-05-30 10:05:37 +02:00
Harry Gulliford 0b3deeaac5 Add accounting number format style (#974) 2019-05-30 09:18:03 +02:00
Yigit Cukuren cce6e5976f Calculation :: Added switch function (#983) 2019-05-30 09:14:58 +02:00
Fräntz Miccoli 9a208b31d8
Fix a SUMIF warning when having different length of arrays provided as input
Closes #873
2019-05-26 20:58:00 +12:00
Adrien Crivelli 27255ce808
Whitelist `tsv` extension when opening CSV files
Fixes #429
2019-05-26 20:07:01 +12:00
Adrien Crivelli 84e09df798
1.7.0 2019-05-26 14:50:36 +12:00