Commit Graph

2305 Commits

Author SHA1 Message Date
MrCue 25c7187727 Fix return type hint (#947) 2019-04-15 21:33:07 +02:00
Przemysław Szustak 0dd6e27d8f Conditional formatting - support for Conditional::CONDITION_CONTAINSBLANKS (#883)
Condition formating option was not supported. I unziped xlsx and found this formula to option blank field
2019-04-15 21:32:22 +02:00
Fräntz Miccoli 8b589c4ef3 Fix MATCH an error was appearing when comparing strings against 0 (always true) + making a return statement a bit more explicit (#855) 2019-03-06 22:37:06 +01:00
Mark Baker 432e5845e1
isDateTime() now checks for cell value as well as format mask (#919)
* isDateTime() now checks for cell value as well as format mask
2019-03-06 22:25:00 +01:00
Mark Baker 9b004b1e6a
Ignore escaped enclosures within an enclosure when inferring csv separator (#906) 2019-02-25 23:20:50 +01:00
Laurentiu Dancu 334afde9cd Fix #783 Csv separator detection nesting limit error. (#845) 2019-02-25 18:31:35 +01:00
Mark Baker f26023586e
SImplify separator inference code (#903) 2019-02-24 23:55:08 +01:00
Mark Baker df1085505c
SImplify separator inference code (#904) 2019-02-24 23:54:52 +01:00
Mark Baker c9dc1e6130
String value binder (#901)
* Document calculation caching; and how to disable it and how to flush the cache

* Quoted text for string values beginning with `=`, so that they are still treated as strings and not as formulae

* Warning about assigning cells to variables

* Further warning about assigning cells to variables

* getCell() with a second argument

* Added String Value Binder, and a Reader example demonstrating how to use it

* Ensure value is a string before binding

* Sample file for String Value Binder

* PHPCS moaning about order or use statements

* Order of annotations, that PHPStorm determined, isn't what phpcs says it should be
2019-02-23 18:40:07 +01:00
Mark Baker 58a5172b8f
Document Improvements … (#899)
* Document calculation caching; and how to disable it and how to flush the cache

* Quoted text for string values beginning with `=`, so that they are still treated as strings and not as formulae

* Warning about assigning cells to variables

* Further warning about assigning cells to variables
2019-02-23 10:22:18 +01:00
Mark Baker 033ed16db5
Dde call safe handling (#891)
* Set handler for quoted text cells and DDE expressions in the Calculation engine
2019-02-18 22:56:32 +01:00
Benjamin Yau d2bbb6cd8e Fix wrong calculation of highest column (#856)
* Fix wrong calculation of highest column

issue #700

* Revert "Fix wrong calculation of highest column"

This reverts commit ef39af1cb6bac8f3101aa52a6336d736910d387b.

* Revert "Revert "Fix wrong calculation of highest column""

This reverts commit d13493ecbedf57253448438311c1d04a3ebdb65e.

* Revert Xlsx reader

* Fix indentation
2019-02-17 18:32:45 +01:00
MarkBaker a8642a2e9e More CS niceties 2019-02-17 17:50:39 +01:00
MarkBaker 917592001e CS Style fixes 2019-02-17 17:40:57 +01:00
Mark Baker f4f4d513e7
Handling function calls that accept an excel error as an argument (#890) 2019-02-17 17:32:45 +01:00
naooooooo99999 a54ed63a6f Add japanese formats (#841) 2019-02-17 12:39:51 +01:00
Patrick Brouwers 1c99f4999c [Feature] Html reader improvements (#884)
* Extract character set, so we can convert to UTF-8 if required

* Set column width and row height when defined on tr/td

* Parse align and valign on td

* Specify number format of cell via html attribute

* Formatting of b, strong, i and em tags

* Inserting image in cell when using img tag in html

* Add applying inline styles: border, fonts, alignment, dimensions

* Add tests for applying inline styles
2019-02-16 23:11:16 +01:00
Mark Baker 11575ef3c4
Load locales clean folder path (#875)
* Fix locale folder path when reading locale list

* Ensure / directory separaor isn't left against locale name
2019-02-08 21:08:55 +01:00
Adrien Crivelli bf00f0cc5f
1.6.0 2019-01-02 15:42:54 +11:00
Adrien Crivelli d0dea580ad
Fix a few Scrutinizer issues 2019-01-02 15:38:13 +11:00
Adrien Crivelli 0e8fde9be6
`master` is the new default branch
`master` is now the only permanent branch. Features and fixes should be merged
into `master` when stable. Pull requests should be forked from `master`.

`develop` branch disappear entirely in favor of temporary features/fixes branches.
2019-01-02 15:28:38 +11:00
Adrien Crivelli 04b5bf593d
Document font may be null
Fixes #833
2019-01-02 14:34:14 +11:00
Adrien Crivelli 3b0c686630
Fix iconv unsupported `//IGNORE//TRANSLIT` on IBM i
Fixes #791
2019-01-02 14:23:34 +11:00
GreatHumorist 699da09176
Fix time format for duration was incorrect
When using format `[h]:mm` it should convert to the "total hours:minutes"

Closes #666
Fixes #664
Fixes #446
Fixes #342
2019-01-02 13:17:52 +11:00
Kirill Petrov 39b573b29d
Fix infinite loop when reading invalid ODS files
According to the spec, http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1415588_253892949,
a `<table:table-row>` can only ever contains a `<table:table-cell>` or
a `<table:covered-table-cell>`, but it seems that some invalid files in the wild
may contains something else. That would trigger an infinite loop. So instead we
totally ignore the invalid content.

Closes #832
2019-01-02 12:16:41 +11:00
Mahmoud Abdo 86c635b3f5
Fix color from CSS when reading from HTML
In case we generate Spreadsheet from html file and the code
in file have text color in css "color:#FF00FF" it will showing
as black color because it will render like rgb content with } "FF00FF}"
So, we fix it by adding missing bracket "{".

Closes #831
2019-01-02 11:57:30 +11:00
Matt Allan 0f8292fc0b
Use gt operator instead of max for highest row
Using an operator is significantly faster than calling the max function.
As this method is called more than once per cell the difference adds up.

Closes #824
2019-01-02 11:09:55 +11:00
Matt Allan ff6f4f4ec0
Remove duplicate strtoupper
Removing the duplicate strtoupper call has a meaningful impact on
performance since this method is called at least once per cell.

`Worksheet::getCells` currently calls `strtoupper` twice. `strtoupper`
is kind of expensive and this method is called at least once for every
cell in the spreadsheet.  By removing the unnecessary second call the
runtime decreases by 18% when importing a ~100K cell spreadsheet.

Closes #825
2019-01-01 17:54:55 +11:00
Adrien Crivelli e8c25c33cd
Fix unit tests for 2019 2019-01-01 17:48:07 +11:00
Matt Allan f28289f92a
Use a generator for Cells::getAllCacheKeys
Using a generator reduces memory usage and improves performance
when loading large spreadsheets.

Closes #822
2019-01-01 17:38:07 +11:00
Philipp Kolesnikov 8918888e7c
libxml_disable_entity_loader() changes global state so it should be used as local as possible
Fixes #801
Closes #802
Closes #803
2019-01-01 17:25:24 +11:00
Paolo 6a48b505b6
Support COUNTIFS multiple arguments
Because Excel COUNTIFS function can have more than 2 arguments.

Closes #830
2019-01-01 16:38:45 +11:00
MarkBaker 50ed769b38 Revert accidental PHP version update to develop branch 2018-12-28 22:31:14 +01:00
MarkBaker 8c99d9d8c0 Update to minimum PHP version of 7.0, and use as a new baseline development branch for PHPSpreadsheet version 2 development 2018-12-28 22:11:35 +01:00
Fräntz Miccoli 294ba58dde
Exact match in VLOOKUP now returns first match
It was inconsistent with spreadsheet software before.

Closes #809
2018-12-15 17:42:07 +11:00
Fräntz Miccoli db2621c4fe
Add tests for the LOOKUP function
We were performing operations to patch for missing $result_vector
even when one was defined, this was causing bugs on edge cases.

Fixes #796
Closes #816
2018-12-15 16:23:45 +11:00
Christian Stoller f0e69408ca Extended the docblock of Style::applyFromArray with example for alignment styling 2018-12-10 20:24:29 +11:00
Mehdi Chaouch 942a78a0a0 Add further new Functions introduced in MS Excel 2016 2018-12-10 20:18:35 +11:00
Dennis Birkholz e56fbe2745
Fix column names if read filter calls in XLSX reader skip columns
Fixes #777
Closes #778
2018-12-10 20:00:26 +11:00
Gabriel Caruso dfa808a955 Simplify some conditions and ternary expressions 2018-12-10 18:54:51 +11:00
Krzysztof Ruszczynski 12bf085c57
Custom color for pie and donut charts
This is an follow-up for #158

Fixes #768
2018-12-10 18:43:55 +11:00
Adrien Crivelli 00003fbe68
Merge branch 'master' into develop 2018-12-10 18:10:37 +11:00
Adrien Crivelli 153186e897
Remove deprecated sudo from Travis 2018-12-05 09:29:31 +11:00
MarkBaker 501f5722be Changelog 2018-11-29 22:52:48 +01:00
Dennis Birkholz 95c41da020 Cache readFilter access and skip inner loops for empty/default readFilter (#773)
For large XLSX files `Reader/Xlsx::readColumnsAndRowsAttributes()` performs
a lot of calls to `$this->getReadFilter()` and `$this->getReadFilter()->readCell()`
as `readCell()` is called twice for each (possibbly filled) cell.

By ignoring calls to the DefaultReadFilter implementation (which always returns true),
using no custom read filter will not incur any runtime penalty.

The runtime penaltiy when using a custom read filter is reduced by a third by
caching the read filter into a variable instead of using the getter method.

Fixes issue #772.
2018-11-29 22:50:48 +01:00
Mark Baker a5eb64c77f
Matrix (#790)
* Refactor Excel Matrix functions to use external Matrix library rather than JAMA
2018-11-29 22:25:31 +01:00
MarkBaker cd60531c44 Improvements to the design of the XML Security Scanner 2018-11-25 18:40:15 +01:00
MarkBaker b6a73aec56 Improvements to the design of the XML Security Scanner 2018-11-25 18:39:05 +01:00
MarkBaker 3abb7ccb35 CS Complaining about not uisng $this->assertInternalType('object', $scanner); 2018-11-25 14:41:11 +01:00
MarkBaker 14159d985c Coding standards 2018-11-25 14:33:01 +01:00