Commit Graph

5985 Commits

Author SHA1 Message Date
oleibman 11d60f6ace Add Sample for Sort By Column 2025-12-13 10:24:07 -08:00
oleibman d727455173 Document Excel's Behavior When Sorting Different DataTypes 2025-12-11 17:37:17 -08:00
oleibman f62034a752 Booleans
I don't know how Excel managed to mess up sorts involving booleans, but they did.
2025-12-10 14:57:02 -08:00
oleibman 9362d21bb5 Additional Test 2025-12-10 11:47:11 -08:00
oleibman 559ab2294a Better Tests for SORT and SORTBY
Current tests use only direct calls. Using them in spreadsheet context would be better.

There were some minor bugs. Excel treats an argument consisting of a single-cell as if it were a range; PhpSpreadsheet, which currently returns the content of the single cell, is changed to match that behavior, which is important if one of the other arguments causes a VALUE error.

Excel can do a column sort in SORTBY, despite the fact that Microsoft doesn't even mention that possibility in its documentation. I found documentation of that possibility on a 3rd-part site https://exceljet.net/functions/sortby-function, confirmed it in Excel, and took my best guess as to how to implement it. The existing test member for SORTBY included one such test, but it succeeds mostly by accident. The new member has a more reliable test.
2025-12-09 23:13:12 -08:00
oleibman 60aa9704b4 Merge pull request #4741 from oleibman/unseparate
Eliminate Unneeded Separate Process Tests
2025-12-09 08:02:02 +00:00
oleibman 0575e2062c Minor Modifications to Sample Names and Locations 2025-12-08 08:53:59 -08:00
oleibman 2c8177a319 Eliminate Unneeded Separate Process Tests
The tests stay; they just no longer run in separate processes. I think that only 2 tests still require separate processes - Helper/SampleTest and Tcpdf/NoDieTest. Aside from a new internal method in IOFactory, all the changes here are to test members.
2025-12-07 23:15:01 -08:00
oleibman f1ab77698e Merge pull request #4740 from oleibman/issue4739
Single Character Table Names
2025-12-06 15:10:57 +00:00
oleibman 01f9b2a60b Single Character Table Names
Fix #4739. Change `+` to `*` in regexp. Add test.
2025-12-06 05:58:28 -08:00
oleibman 0acb994be5 Merge pull request #4738 from oleibman/nophpunit9
Remove Phpunit9-specific Portions of Test Suite
2025-12-05 05:20:01 +00:00
oleibman 7cd257b7c1 Remove Phpunit9-specific Portions of Test Suite
Some tests are only run under Phpunit9, but we use Phpunit10 for all supported releases. Eliminate the unused tests.
2025-12-04 20:57:05 -08:00
oleibman 954fb871d3 Merge pull request #4735 from oleibman/gridright
Minor Improvements to TextGrid
2025-12-05 02:59:36 +00:00
oleibman e3140e5142 Update CHANGELOG.md 2025-12-04 18:56:43 -08:00
oleibman fe6d02b7d8 Different Ways of Setting numbersRight 2025-12-04 18:51:30 -08:00
oleibman 56537cb392 Merge pull request #4736 from zhukoff74/refactor_HandlerTest
Removed duplicate try-catch statements
2025-12-05 02:41:10 +00:00
oleibman 341b999976 Improve Sample Output 2025-12-04 17:55:18 -08:00
zhukoff74 c0e7bfdcb5 Removed duplicate try-catch statements 2025-12-04 21:16:44 +03:00
oleibman ef6c3758c7 Minor Improvements to TextGrid
Add property to right-align numeric fields.

Make most private properties/methods protected.
2025-12-04 08:34:47 -08:00
oleibman dde7fe180b Merge pull request #4734 from zhukoff74/refactor_CellTest
Simplified CellTest and added a helper method for styles
2025-12-04 03:37:25 +00:00
oleibman c1be7a5bb5 Strengthen One Test 2025-12-03 19:33:07 -08:00
zhukoff74 49479a01b2 replace with 2025-12-03 23:37:01 +03:00
zhukoff74 873aa649fc Simplified CellTest and added a helper method for styles 2025-12-03 22:54:20 +03:00
oleibman a56cbaccb1 Merge pull request #4733 from oleibman/mpdf85
Update Mpdf
2025-12-03 19:01:06 +00:00
oleibman a8b86e38bb Update Mpdf
Fully 8.5 compliant version was just released.
2025-12-03 10:34:35 -08:00
oleibman 09b704a8bd Merge pull request #4732 from zhukoff74/refactor_ArrayTest
Improve ArrayTest structure and readability
2025-12-03 07:07:35 +00:00
zhukoff 998ce215c4 Corrections based on comments 2025-12-03 07:38:54 +03:00
oleibman 5106fac5b1 Merge pull request #4726 from oleibman/issue4724
Slightly Better Support for Escaped Characters in Xlsx Reader/Writer
2025-12-03 03:44:00 +00:00
oleibman e455f73d91 Merge branch 'master' into issue4724 2025-12-02 19:41:09 -08:00
oleibman 09a1865b26 Update CHANGELOG.md 2025-12-02 19:40:30 -08:00
zhukoff74 c8fc2863e3 Improve ArrayTest structure and readability 2025-12-02 21:09:08 +03:00
oleibman 6e28a5c1f9 A Bit More Flexibility in StringHelper
Make some properties protected rather than private.
2025-12-02 08:41:49 -08:00
oleibman 548664b3fa Resolve iconv //IGNORE//TRANSLIT Inconsistency Between Systems 2025-12-02 02:40:17 -08:00
oleibman 00dc18404d Unable to Reproduce Failure
Php8.5 problem with iconv //IGNORE.
2025-12-02 01:18:36 -08:00
oleibman 4284098100 Coverage Tweak 2025-12-02 00:54:10 -08:00
oleibman ac5ce66274 Merge pull request #4727 from oleibman/codeunicode
CODE/UNICODE and CHAR/UNICHAR
2025-12-02 07:03:53 +00:00
oleibman 919c6c1750 Update CHANGELOG.md 2025-12-01 23:00:56 -08:00
oleibman 65c0477e88 Edge Case 2025-12-01 22:35:43 -08:00
oleibman 98ca50e9fe Handle Surrogates If Read
It is probably very anal of me to do this. Excel does it. I can't see it happening in the wild.
2025-12-01 16:57:42 -08:00
oleibman fd923c93c4 Merge pull request #4730 from zhukoff74/fix-test-column-index
Two tests have been rewritten to use modern PHPUnit style.
2025-12-01 22:33:22 +00:00
zhukoff74 461baaff65 Two tests have been rewritten to use modern PHPUnit style. 2025-12-02 00:06:43 +03:00
oleibman edd28628f3 Typos in Test Comments 2025-12-01 11:00:23 -08:00
oleibman 5c504ac4ce MACROMAN Charset is on My System, but not Github's - Try MAC Instead 2025-11-28 18:15:10 -08:00
oleibman b243f2f4e5 CODE/UNICODE and CHAR/UNICHAR
PhpSpreadsheet treats CODE and UNICODE as equivalent, likewise for CHAR and UNICHAR. They are, in fact, different. CODE and CHAR deal only with single-byte character sets (Windows-1252 or MacRoman), while UNICODE and UNICHAR deal with all of Unicode. This PR separates them. The existing unit test for CODE was, in many cases, applicable to UNICODE (for which there was no separate test). The tests are corrected for CODE, new tests are added, and a separate test for UNICODE is added. CHAR was mostly okay, new tests are added, and a separate test for UNICHAR is added.
2025-11-28 13:21:27 -08:00
oleibman 0a96e52457 Additional Test 2025-11-27 23:43:31 -08:00
oleibman 0faea6c1c1 Slightly Better Support for Escaped Characters in Xlsx Reader/Writer
See [Discussion 4724](https://github.com/PHPOffice/PhpSpreadsheet/discussions/4724)

PhpSpreadsheet converts all control characters (x00-x1f) in strings to and from a form which Excel recognizes (e.g. `x1c` becomes `_x001C_` when writing, and vice versa when reading). There have historically been 3 exceptions which go unconverted - tab (x09), line feed (new line) (x0a), and carriage return (x0d). PR #4536 removed those exceptions, but that caused some problems; these were fixed by PR #4619, but the exceptions were restored.

The referenced discussion deals with a spreadsheet with a cell containing `_x000D_`, carriage return. Although the writer no longer converts to that string on output, the reader should be able to handle it on input. In fact, the reader ought to handle any string of the form "underscore x 4-hex-digits underscore", whether or not it represents a control character.

And there's an interesting edge case. If a user enters into a cell the string `A_x0030_B`, it needs to be handled as-is. Excel handles this by writing it out as `A_x005F_x0030_B`, i.e. substituting `_x005F_` for the first underscore, so that the reader sees `_x005F_` (converting it to underscore) followed by `x0030_B` (no leading underscore, so no conversion). PhpSpreadsheet could probably handle this by converting all underscores on write, but I am trying to emulate Excel and do it only when needed.
2025-11-27 10:35:06 -08:00
oleibman cd4e71ed77 Merge pull request #4725 from oleibman/branchnames
Update Branch Names in CONTRIBUTING
2025-11-27 05:55:56 +00:00
oleibman 4f893f931d Update Branch Names in CONTRIBUTING 2025-11-26 21:50:01 -08:00
oleibman 097bea58b4 Merge pull request #4723 from oleibman/xmltodo
Eliminate TODO in Reader/Xml/Style/Border
2025-11-26 19:50:32 +00:00
oleibman b1b819e1f7 Eliminate TODO in Reader/Xml/Style/Border
Also clean up the code a bit as long as I was in there.
2025-11-26 10:49:36 -08:00