Commit Graph

694 Commits

Author SHA1 Message Date
Adrien Crivelli
15bd764a08
A few more invalid displayBlanksAs 2020-05-17 19:35:18 +09:00
Chris Wolcott
d49567aad0
File containing a chart can be opened by Excel 2003/2013/2019
All chart examples passed the displayBlanksAs parameter as 0 instead of 'gap'.
I added a constants EMPTY_AS_GAP, EMPTY_AS_ZERO and EMPTY_AS_SPAN to the
DataSeries and then change all chart samples to use this new constant.

Fixes #1337
Closes #1448
2020-05-17 19:28:27 +09:00
Adrien Crivelli
c725128a68
CSV writer also use common code to open file 2020-05-17 18:58:32 +09:00
Adrien Crivelli
5f413b8a58
Keep sample bootstrap purely in samples 2020-05-17 18:51:13 +09:00
oleibman
7517cdd008
Improve Coverage for CSV (#1475)
I believe that both CSV Reader and Writer are 100% covered now.

There were some errors uncovered during development.

The reader specifically permits encodings other than UTF-8 to be used.
However, fgetcsv will not properly handle other encodings.
I tried replacing it with fgets/iconv/strgetcsv, but that could not
handle line breaks within a cell, even for UTF-8.
This is, I'm sure, a very rare use case.
I eventually handled it by using php://memory to hold the translated
file contents for non-UTF8. There were no tests for this situation,
and now there are (probably too many).

"Contiguous" read was not handle correctly. There is a file
in samples which uses it. It was designed to read a large sheet,
and split it into three. The first sheet was corrrect, but the
second and third were almost entirely empty. This has been corrected,
and the sample code was adapted into a formal test with assertions
to confirm that it works as designed.

I made a minor documentation change. Unlike HTML, where you never
need a BOM because you can declare the encoding in the file,
a CSV with non-ASCII characters must explicitly include a BOM
for Excel to handle it correctly. This was explained in the Reading CSV
section, but was glossed over in the Writing CSV section, which I
have updated.
2020-05-17 18:15:18 +09:00
drewblin
3090c1e73f
Support CSV files with data wrapping a lot of lines
If there is "line" splited on lot of lines we can reach limit of recursion
nesting. It's better to use while instead of recursion.

Closes #1468
2020-05-17 17:58:08 +09:00
Adrien Crivelli
7e79782dae
Remove @throws comment
Those are extremely hard to maintain properly and bring almost
no value, especially if they are outdated
2020-05-16 20:33:25 +09:00
Adrien Crivelli
8967696095
Merge pull request #1292 from basbl/write-to-stream-support
Support writing to resource handles in all IWriter implementations
2020-05-16 20:25:53 +09:00
Adrien Crivelli
e34535329d
Remove obsolete arguments 2020-05-16 20:25:01 +09:00
Adrien Crivelli
fcf7820467
All writers can write to stream 2020-05-16 20:12:28 +09:00
Adrien Crivelli
9cdbddf3bf
Early bail out if resource cannot be opened 2020-05-16 18:08:10 +09:00
Adrien Crivelli
588ca6beb3
Replace migration tool with RectorPHP
Fixes #1445
2020-05-02 12:34:50 +09:00
basbl
b60b1d25c0
Test scrutinizer 2020-04-27 21:48:56 +02:00
basbl
11499aad9a
Add resource parameter handling to html, csv and xls writers 2020-04-27 21:26:55 +02:00
basbl
ccb49de301
Add support for streaming zip files in the xlsx and ods writers 2020-04-27 21:26:55 +02:00
Collie-IT
973011921d
Add Missing Operator NOTBETWEEN (#1390) 2020-04-27 12:01:36 +02:00
Adrien Crivelli
03c587fe0b
Drop PHP 7.1
This is according to our formal, published, policy to only support
eol PHP after 6 months.

See https://phpspreadsheet.readthedocs.io/en/latest/#php-version-support
2020-04-27 18:42:32 +09:00
n-longcape
f9f9f4cacf
Fix ROUNDUP and ROUNDDOWN for negative number
Closes #1417
2020-04-27 17:03:07 +09:00
bbinotto
e2f87e8b7a
Load with styles should not default to black fill color
Fixes #1353
Closes #1361
2020-04-26 22:33:30 +09:00
Paul Kievits
a6c56d0f81
Added support for the FLOOR.MATH and FLOOR.PRECISE functions 2020-04-26 22:19:33 +09:00
Owen Leibman
c4895b9468
MATCH with a static array should return the position of the found value based on the values submitted.
Returns #N/A, unless the element searched for is at the end of the array.

The problem is in Calculation.php line 4231:
                    if (!is_array($functionCall)) {
                        foreach ($args as &$arg) {
                            $arg = Functions::flattenSingleValue($arg);
                        }
                        unset($arg);
                    }

I believe this code is intended to handle functions where PhpSpreadsheet just passes
the call on to PHP without implementing the code on its own, e.g. for atan or acos.
In the bug report, the following code fails:
  $flat_rate = "=MATCH(6,{4,5,6,2}, 0)";
  $sheet->getCell('A1')->setValue($flat_rate);
The expected value is 3, but the actual result is "#N/A".
The reason for this result is that the parser replaces the braces with calls
to the MKMATRIX internal function, whose value for functioncall was:
'self::MKMATRIX'. Since this isn't an array, the flattening code is executed,
and the unintended result occurs. The fix is to change the definition for
functioncall in that case to [__CLASS__, 'mkMatrix'], avoiding the flattening.

However, there is also another part to this bug. The flattening should be
returning the first entry in the array, but is in fact returning the last.
This explains why the bug report specified "unless ... end of the array".
I confirmed that Excel does use the first item in the array rather than the last,
e.g. =atan({1,2,3}) entered into a cell will return atan(1), not atan(3).
The problem here is that flattenSingleValue, which says in its comments that
it is supposed to be returning the first item, uses array_pop rather than array_shift.
I have changed that as well. The same mistake was also present in
Cell.php function getCalculatedValue. The correct behavior can be verified
by entering =minverse({-2.5,1.5;2,-1}) into an Excel cell'
Excel flattens the result ({2,3;4,5}) to 2, and so should PhpSpreadsheet.

Fixes #1271
Closes #1332
2020-04-26 22:09:31 +09:00
Jon Dufresne
6788869a40
Fix typo: occured → occurred (#1435) 2020-04-26 21:09:56 +09:00
Tim Gavryutenko
3dcc5ca753
Fix removing last row incorrect behavior
`$highestRow = $this->getHighestDataRow();` was calculated after `$this->getCellCollection()->removeRow($pRow + $r);` - this is the root reason for incorrect rows removal because removing last row will change '$this->getHighestDataRow()' value, but removing row from the middle will not change it. So, removing last row causes incorrect `$highestRow` value that is used for wiping out empty rows from the bottom of the table:
```php
for ($r = 0; $r < $pNumRows; ++$r) {
    $this->getCellCollection()->removeRow($highestRow);
    --$highestRow;
}
```
To prevent this incorrect behavior I've moved highest row calculation before row removal.
But this still doesn't solve another problem when trying remove non existing rows: in this case the code above will remove `$pNumRows` rows from below of the table, e.g. if `$highestRow=4` and `$pNumRows=6`, than rows 4, 3, 2, 1, 0, -1 will be deleted. Obviously, this is not good, that is why I've added `$removedRowsCounter` to fix this issue.
And finally, moved Exception to early if statement to get away from unnecessary 'if-else'.

Fixes #1364
Closes #1365
2020-04-26 11:00:43 +09:00
Matthijs Alles
87f71e1930 Support whitespaces in CSS style in Xlsx
Indentation in the xml leaves spaces in style string even after
replacing newlines. Replacing the spaces ensures no spaces in keys
of the resulting style-array

Fixes #1347
2020-04-05 19:50:57 +09:00
Adrien Crivelli
57c36e01d5
Replace Sami with phpDocumentor 3
Because Sami is deprecated and now raise errors. We lose API
docs for multiple versions but we still have latest version with low
maintenance cost.
2020-04-05 17:47:25 +09:00
youkan
a79b344d53
Fix ROUNDUP and ROUNDDOWN for floating-point rounding error (#1404)
Closes #1404
2020-03-07 12:48:54 +07:00
Paul Kievits
a08415a7b5 Improved the ARABIC function to handle short-form roman numerals 2020-03-07 12:43:59 +07:00
Adrien Crivelli
560e672b30
Merge pull request #1385 from ikeyan/feature/update-document
Update docs/references/function-list-by-*.md
2020-03-07 09:25:16 +07:00
Claas Augner
ffb0d21cec PHPDoc: use @return $this for fluent methods
Fluent methods, especially setters, return the object on which are
called. This is documented in PHPDoc using the `$this` keyword, which
is equivalent to `static` with the additional notion of object identity.
This helps IDEs and static analysis tools provide more meaningful output.
2020-03-02 19:11:00 +07:00
Stronati Andrea
9f5a472426 Fix XLSX file loading with autofilter containing '$'
The `setRange` method of the `Xlsx/AutoFilter` class expects a filter
range format like "A1:E10". The returned value from
`$this->worksheetXml->autoFilter['ref']` could contain "$" and returning
a value like "$A$1:$E$10".

Fixes #687
Fixes #1325
Closes #1326
2020-03-02 18:43:27 +07:00
Owen Leibman
fb379385e0
Fix active cell when freeze pane is used
When freeze pane is in use on a worksheet, PhpSpreadsheet saves to Xlsx in such
a way that the active cell is always set to the top left cell below the freeze
pane. I find it difficult to understand why:

  1. You have given users the setSelectedCells function, but then choose to
     ignore it.
  2. Excel itself does not act in this manner.
  3. PHPExcel did not act in this manner.
  4. PhpSpreadsheet when writing to Xls does not act in this manner.
     This is especially emphasized because the one test in FreezePaneTest which
     would expose the difference is the only test in that member which is
     not made for both Xls and Xlsx.
  5. It is *really* useful to be able to open a spreadsheet anywhere, even when
     it has header rows.

Closes #1323
2020-03-02 18:11:37 +07:00
Jimmy4o4
06d9dc03e9 Fix for Xls writer wrong selected cells and active sheet 2020-03-02 17:50:46 +07:00
池下克彦
fe83f070aa improve testability 2020-02-24 23:24:47 +09:00
池下克彦
e11202168f bin/generate-document generates function-list-by-* 2020-02-21 14:56:43 +09:00
池下克彦
80f5e8fd1e added IFS, NETWORKDAYS.INTL and WORKDAY.INTL as dummy EXCEL function
they are listed on the doc
2020-02-21 14:48:33 +09:00
oleibman
cb18163a1d
Changes to WEEKNUM and YEARFRAC (#1316)
* Changes to WEEKNUM and YEARFRAC

The optional second parameter for WEEKNUM can take any of 10 values
(1, 2, 11-17, and 21), but currently only 1 and 2 are supported.
This change adds support for the other 8 possibilities.

YEARFRAC in Excel does not require that end date be before start date,
but PhpSpreadsheet was returning an error in that situation.

YEARFRAC third parameter (method) of 1 was not correctly implemented.
I was able to find a description of the algorithm, and documented
that location in the code, and implemented according to that spec.
PHPExcel had a (failing) test to assert the result of
YEARFRAC("1960-12-19", "2008-06-28", 1). This test had been dropped
from PhpSpreadsheet, and is now restored; several new tests have
been added, and verified against Excel.

* Add YEARFRAC Tests

Scrutinizer reported a very mysterious failure with no details.
project.metric_change("scrutinizer.test_coverage", < 0),
without even a link to explain what it is reporting.
It is possible that it was a complaint about code coverage.
If so, I have added some tests which will, I hope, eliminate the problem.

* Make Array Constant

Responding to review from Mark Baker.

* Merge with PR 1362 Bugfix 1161

Travis CI reported problem with Calculation.php (which is not part
  of this change).
That was changed in master a few days ago
(delete some unused code).
Perhaps the lack of that change is the problem here.
Merging it manually.
2020-02-19 20:22:31 +01:00
paulkned
0c52f173aa
Added support for the base function (#1344) 2020-02-19 20:12:30 +01:00
paulkned
25e3e45eb6
Added support for the ARABIC excel function (#1343)
Updated changelog

Updated docprops

Fixed stylci
2020-02-11 22:59:19 +01:00
Jon Link
14d807c2c4 BUGFIX for issue #1161 (#1328)
Removed broken unused code that tried to set a constant multiple times.

Fixes #1161
Closes #1328
2020-01-24 06:40:30 +01:00
Mark Baker
83a50537b2
Return type docblock fixes (#1305)
* Return type docblock fixes
2020-01-04 22:17:40 +01:00
oleibman
082266aacd Conditionals - Extend Support for (NOT)CONTAINSBLANKS (#1278)
Support for the CONTAINSBLANKS conditional style was added a while ago.
However, that support was on write only; any cells which used
CONTAINSBLANKS on a file being read would drop that style.

I am also adding support for NOTCONTAINSBLANKS, on read and write.
2020-01-04 18:50:04 +01:00
oleibman
1c6dd8923e Handle Error in Formula Processing Better for Xls (#1267)
* Handle Error in Formula Processing Better for Xls

When there is an error writing a formula to an Xls file,
which seems to happen when a defined name is part of a formula,
the cell is currently left blank. A better result would be to
write the calculated value of the formula.

* Making Changes Suggested in Review

Per comment from Mark Baker:
   1. Made return codes from writeFormula into constants.
   2. Skipped redundant call to getCellValue when possible.
   3. Added support for bool type, adding additional tests
      for bool and string.
Per comment from PowerKiki:
   1. Used standardized convention for assigning file name in test.
      Since before this change, save would throw Exception, I kept
      the unlink for the file in tearDown.
2020-01-04 18:34:21 +01:00
oleibman
afd070a756 Handle ConditionalStyle NumberFormat When Reading Xlsx File (#1296)
* Handle ConditionalStyle NumberFormat When Reading Xlsx File

ReadStyle in Reader/Xlsx/Styles.php expects numberFormat to be a string.
However, when reading conditional style in Xlsx file, NumberFormat
   is actually a SimpleXMLElement, so is not handled correctly.
While testing this change, it turned out that reader always expects
   that there is a "SharedString" portion of the XML, which is not
   true for spreadsheets with no string data, which causes a
   run-time message.
Likewise, when conditional number format is not one of the built-in
   formats, a run-time message is issued because 'isset' is used
   to determine existence rather than 'array_key_exists'.
The new workbook added to the testing data demonstrates both those
   problems (prior to the code changes).

* Move Comment to Resolve Conflict

Github reports conflict involving placement of one comment statement.

* Respond to Scrutinizer Style Suggestion

Change detection for empty SimpleXMLElement.
2020-01-04 00:10:41 +01:00
Mark Baker
e19228ecb0
Additional cell datatype unit tests (#1301) 2020-01-03 23:29:53 +01:00
Markus Salmijärvi
ab4c6602cf Fix Xlsx Writer's handling of decimal commas (#1282)
Perform the comma -> period substitution in Xlsx Writer writeCell()
before checking if the decimal value has a period in it. The previous
behavior led to decimals of the form "1,1" to become "1.1.0".
2020-01-03 22:34:10 +01:00
Guilherme Capanema
144a0cabbc
Get plotVisOnly and dispBlanksAs props from chart in Xlsx Chart Writer.
These chart properties where hardcoded in the Xlsx writer, ignoring the
values passed to the \PhpOffice\PhpSpreadsheet\Chart\Chart class constructor.

I also changed the default $displayBlanksAs value to 'gap' to match this
document:
https://docs.microsoft.com/en-us/openspecs/office_standards/ms-oi29500/1942c028-3c4e-4dd9-a379-b12a9b7914df

Closes #1266
2019-12-01 00:51:38 +01:00
milkyway
d61855effe
ODS writer prevent invalid numeric value if locale decimal separator is comma
Closes #1268
2019-11-30 16:33:19 +01:00
rtek
cf30c2a824
Modify XLSX RW to keep decimal for floats with a zero decimal part
Prior to 1.10, all numeric values where read as floats. In 1.10
numeric values are read using 0 + x, which relies on PHP type
juggling rules. As a result, float(0.0) is written as string('0'),
then read back as int(0). This fix causes the writer to retain the
the decimal for float values such that a reader can differentiate
floats from ints.

Closes #1262
2019-11-30 16:15:48 +01:00
Owen Leibman
9552172b85
Do not confuse defined names and cell refs
CALCULATION_REGEXP_CELLREF is not sufficiently robust.
It treats some perfectly legal defined names, e.g. A1A, as cell refs.
When the Xlsx Writer tries to save a worksheet which uses such a name
in a formula in a cell, it throws an exception.

The new DefinedNameConfusedForCellTest is a simple demonstration.
The Regexp has been changed to ensure the name starts on a Word boundary,
and to make sure it is not followed by a word character or period.
This fixes the problem, and does not appear to cause any regression
problems in the test suite.

Closes #1263
2019-11-30 16:10:43 +01:00
coolhub
86fa5424a6
Correct column style even when using rowspan
Closes #1249
2019-11-30 15:40:42 +01:00
Ikko Ashimine
cc92c6648e
FLOOR() function accept negative number and negative significance
Closes #1245
2019-11-30 15:18:04 +01:00
Adrien Crivelli
9fa45f7e48
PHP 7.4 compatibility 2019-11-30 00:12:46 +01:00
Robert Doering
6a2e0cef43
Read xlsx files with exotic workbook names like "workbook2.xml"
Some auto generated xlsx files are using other names as workbook than "workbook.xml".
This is fixed by supporting names of workbooks by regex `/workbook.*\.xml/`.

Closes #1183
2019-11-17 21:53:09 +01:00
Roland Eigelsreiter
e5409f0fed fix access error
Fix the error "Trying to access array offset on value of type null"
2019-11-17 21:47:31 +01:00
Adrien Crivelli
256e5ad0e7 Code style 2019-11-17 21:17:56 +01:00
Nathanael d. Noblet
22bf54ca11 Allow Html Reader to write into existing spreadsheet
Sometimes you may want to read html into multiple worksheets within one
spreadsheet. Allowing the passing of a spreadsheet in makes this possible.
2019-11-17 21:17:56 +01:00
Paul Blacknell
788f79c1bb
Validate XIRR inputs and return correct error values
Fix: Return #NUM! if values and dates contain a different number of values
Fix: Return #NUM! if there is not at least one positive cash flow and one negative cash flow
Fix: Return #NUM! if any number in dates precedes the starting date
Fix: Return #NUM! if a result that works cannot be found after max iteration tries
Fix: Correct DocBlocks for XIRR & XNPV
Add: Validate XIRR with unit tests

Closes #1177
2019-11-17 21:17:12 +01:00
Dennis Holst
3fc2fa47de Check for existing xf index in mapping array before accessing it 2019-11-17 21:09:28 +01:00
Adrien Crivelli
b636c56d7f
Code style 2019-11-17 21:03:47 +01:00
Jorge Casas
156ab360fe
Fixed Functions->ifCondition for allowing <> and empty condition
In cells with formulas containing conditions like `=IFSUM(A1:A3;"";B1:B3)`
to sum cells from range A1:A3 with empty value in range B1:B3, the function
`Functions::ifCondition()` create in this case the code `=""""` instead of
`=""`, so it didn't work.

Closes #1206
2019-11-17 21:03:11 +01:00
Jerome3
b20f5c1d11
Fix ODS Reader when no DC namespace are defined
ODS files without spreadsheet properties were triggering a fatal error

Fixes #1047
Fixes #1176
Closes #1182
2019-11-17 20:57:53 +01:00
Fräntz Miccoli
445cc18e39
Fix IF implementation to comply with Excel behavior
Closes #1165
2019-11-17 18:26:33 +01:00
Adrien Crivelli
5ec0e333dd
Fix code style 2019-11-17 17:44:02 +01:00
Diego Souza
157b6e75e4
useless parentheses 2019-11-17 17:40:20 +01:00
Diego Souza
fac1d6de14
unnecessary string concatenation 2019-11-17 17:40:09 +01:00
Diego Souza
ba735e21d6
combined assignment operator 2019-11-17 17:39:59 +01:00
Diego Souza
d2cb2a0d1a
fixes UselessVariable and UnusedVariable from slevomat/coding-standard 2019-11-17 17:39:42 +01:00
Fräntz Miccoli
75dfcb5a36
Fix branch pruning resolution of non boolean conditions
Closes #1167
2019-11-10 22:59:09 +01:00
Adrien Crivelli
5441b2fa73
Keep big integer as integer instead of lossely casting to float
Closes #874
Fixes #1135
2019-11-10 22:51:53 +01:00
Adrien Crivelli
d7d67ff39b
More explicit column index as string
Fixes #951
2019-11-10 20:58:20 +01:00
Suraxius
13eaeb39cf Fixes issue #948 (#1228)
* Fixes issue #948 by including a setUseEmbeddedCSS(false) method. Doesn't change current behaviour if not set

* Removes a empty line in src/PhpSpreadsheet/Writer/Html.php that fails a test
2019-11-01 00:52:20 +01:00
Mark Baker
617ea476c0
Complex number mask for integers containing a single dot (#1227) 2019-10-30 22:54:06 +01:00
Mark Baker
1b4098da8e
Minor scrutinizer fixes (#1226)
* Minor scrutinizer fixes

* Remove spurious debug output
2019-10-30 20:30:52 +01:00
Mark Baker
429a34cb14
Fix row/column range references against a different worksheet (#1224) 2019-10-29 23:35:23 +01:00
Jens Hassler
55209424b2 support "showZeros" setting in Excel advanced worksheet options (#1199)
* support "showZeros" setting in Excel advanced worksheet options

* add changelog entry

* change isShowZeros to getShowZeros
2019-10-28 21:52:30 +01:00
Mark Baker
43b760501a
Text data locale for fixedformat (#1220)
* Apply Locale settings to result of FIXEDFORMAT method call
2019-10-28 20:37:12 +01:00
David Arenas
89066d2568 Bugfix/remove column out of range (#1197)
* Call garbage collector after removing a column

Otherwise callers of getHighestColumn get stale values

* Update changelog

* Fix remove a column out of range removes the last column

Given:
+---+---+
| A | B |
+---+---+
Attempting to remove 'D', should not alter the worksheet

* Avoid side effects when trying to remove more columns than exists
2019-10-28 18:52:06 +01:00
David Arenas
b82afe37dc Bugfix/invalid cached highest column after column removed (#1195)
* Call garbage collector after removing a column

Otherwise callers of getHighestColumn get stale values

* Update changelog
2019-10-28 18:42:56 +01:00
Boris Momčilović
9d6736d303 Writer: Xlsx: Worksheet: handle PHP 7.4 deprecation notice 2019-09-20 16:22:08 -07:00
MarkBaker
f7d2ebac40 Minor fix to operator check 2019-09-20 16:22:08 -07:00
MarkBaker
a691516664 Improvements to default value binder 2019-09-20 16:22:08 -07:00
MarkBaker
b894b98a2c Test fixes for PHP 7.4 stricter behaviour 2019-09-20 16:22:08 -07:00
Adrien Crivelli
ee5134a954
Merge branch 'master' into Further-Test-Refactoring 2019-09-20 16:04:36 -07:00
Andrey Dovbyshko
ed25365531
Fix Writer\Html did not hide columns
Closes #985
2019-08-17 13:26:28 -07:00
yunjusu
bbbfdb86a0
Fix getCalculatedValue() error with more than two INDIRECT
Closes #1115
2019-08-17 12:59:30 -07:00
Nathanael Noblet
95c8bb9918
Allow HTML Reader to load from string
We often want to export a table as an excel sheet. The system renders the
html and it seems like a waste of time to write it to the file system to
use the reader. This allows us to render the html and then just pass it to
a reader

Closes #1136
2019-08-17 12:54:22 -07:00
Adrien Crivelli
34675bdf5d
Remove dead code 2019-08-12 10:04:40 -07:00
Rolands Usāns
9df68f12e2 MATCH function fix
- fix boolean search
- add support for excel expressions `*?~`

Fixes #1116
Closes #1122
2019-08-11 20:11:36 -07:00
Adrien Crivelli
2166458de3
Duplicated call of strtoupper 2019-08-11 19:41:10 -07:00
Adrien Crivelli
7cca8d2bae Consistent format name and value 2019-08-11 19:39:49 -07:00
rumbleh
1e1118d9e0 Update NumberFormat.php
Fix FORMAT_DATE_DDMMYYYY from 'dd/mm/yy' to 'dd/mm/yyyy'
2019-08-11 19:39:49 -07:00
Alex Pravdin
5fe0a796c7
Fix incorrect cache clearance on row deletion
Fixes #868
Closes #871
2019-08-11 18:36:07 -07:00
Fräntz Miccoli
0b387e767e
Branch pruning around IF function calls to avoid resolution of every branches
Calculation engine was resolving every function by first resolving its arguments
including IFs, this was causing significant over evaluation when IFs were used
as it meant for every case to be evaluated.

Introduce elements to identify ifs and enable better branch resolution
(pruning). We tag parsed tokens to associate a branch identifier to them.

Closes #844
2019-08-11 18:23:47 -07:00
Mahmoud Abdo
785705b712
Best effort to support invalid colspan values in HTML reader
Closes #878
2019-07-27 23:31:23 -07:00
MarkBaker
f14e5ea837 More refactoring Excel of Calculation Function Unit Tests 2019-07-27 16:35:27 +02:00
MarkBaker
905a697639 More work on refactoring Excel Calculation Function Unit Tests 2019-07-27 16:02:58 +02:00
Mark Baker
1c6f0b8a9d
Improved tests (#1110)
* Merge branch 'master' of C:\Projects\PHPOffice\PHPSpreadsheet\develop with conflicts.

* New statistical tests

* Sniffs

* Additional statistical function unit tests

* Additional statistical function unit tests

* Fix case-sensitivity

* Fix HARMEAN code logic

* Unit tests refactored into individual files for all logical functions
Implemented IFNA()

* Fix silly typo

* NOT needs ...args to allow for test when no argument passed

* Codestyle

* Use instance asserts
2019-07-26 22:21:17 +02:00
Adrien Crivelli
7faee3d6cc
Take advantage of PHP 7.1 syntax 2019-07-24 23:43:28 -07:00
Adrien Crivelli
454d942c13
Drop PHP 5.6 and 7.0
This is according to our formal, published, policy to only support
eol PHP after 6 months.

See https://phpspreadsheet.readthedocs.io/en/latest/#php-version-support
2019-07-24 23:12:45 -07:00
JeongHean Kim
dbc8777c43 Fix failed stat when using setEmbedImagesin HTML writer
Fixes #1084 
Closes #1085
2019-07-24 23:00:23 -07:00