PhpSpreadsheet/tests/PhpSpreadsheetTests
oleibman 346bad1b1d
Fix for Issue 2042 (SUM Partially Broken) (#2045)
As issue #2042 documents, SUM behaves differently with invalid strings depending on whether they come from a cell or are used as literals in the formula. SUM is not alone in this regard; COUNTA is another function within this behavior, and the solution to this one is modeled on COUNTA. New tests are added for SUM, and the resulting tests are duplicated to confirm correct behavior for both cells and literals.

Samples 16 (CSV), 17 (Html), and 21 (PDF) were adversely affected by this problem. 17 and 21 were immediately fixed, but 16 had another problem - Excel was not interpreting the UTF8 currency symbols correctly, even though the file was saved with a BOM. After some experimenting, it appears that the `sep=;` line generated by setExcelCompatibility(true) causes Excel to mis-handle the file. This seems like a bug - there is apparently no way to save a UTF-8 CSV with non-ASCII characters which specifies a non-standard separator which Excel will open correctly. I don't know if this is a recent change or if it is just the case that nobody noticed this problem till now. So, I changed Sample 16 to use setUseBom rather than setExcelCompatibility, which solved its problem. I then added new tests for setExcelCompatibility, with documentation of this problem.
2021-05-03 18:31:01 +02:00
..
Calculation Fix for Issue 2042 (SUM Partially Broken) (#2045) 2021-05-03 18:31:01 +02:00
Cell Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
Chart Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
Collection Resolve Deprecated setMethods() call when Mocking for tests (#1925) 2021-03-15 14:50:05 +01:00
Custom Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
Document Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
Functional BREAKING `Worksheet::getRowDimension()` and `Worksheet::getColumnDimension()` cannot return null anymore 2021-04-25 17:02:36 +09:00
Helper Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
Reader Ods defined names unit tests (#2054) 2021-05-03 08:39:42 +02:00
Shared Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
Style Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
Worksheet BREAKING `Worksheet::getCell()` cannot return null anymore 2021-04-13 11:09:29 +09:00
Writer Fix for Issue 2042 (SUM Partially Broken) (#2045) 2021-05-03 18:31:01 +02:00
DefinedNameFormulaTest.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
DefinedNameTest.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
DocumentGeneratorTest.php Improve Coverage in src/PhpSpreadsheet 2020-11-27 06:50:01 -08:00
IOFactoryTest.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
NamedFormulaTest.php Named formula implementation, and improved handling of Defined Names generally (#1535) 2020-07-26 12:00:06 +02:00
NamedRangeTest.php Named formula implementation, and improved handling of Defined Names generally (#1535) 2020-07-26 12:00:06 +02:00
ReferenceHelperTest.php Named formula implementation, and improved handling of Defined Names generally (#1535) 2020-07-26 12:00:06 +02:00
SettingsTest.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
SpreadsheetTest.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00