Commit Graph

5960 Commits

Author SHA1 Message Date
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
oleibman 4d597c1aac Merge pull request #4722 from oleibman/changelog20251124
Prepare Changelog for Next Release
5.3.0
2025-11-24 15:47:10 +00:00
oleibman 71d77fadee Prepare Changelog for Next Release 2025-11-24 07:39:00 -08:00
oleibman 95b83f499b Merge pull request #4717 from oleibman/explicit
Prepare to Deprecate Optionality of Second Arg to Cell::setValueExplicit
2025-11-24 15:17:26 +00:00
oleibman aa719cdb02 Merge branch 'master' into explicit 2025-11-21 16:57:24 -08:00
oleibman 98206d9028 Merge pull request #4719 from oleibman/formalphp85try2
Formal Support for Php8.5
2025-11-22 00:39:47 +00:00
oleibman 66422b11b4 Formal Support for Php8.5
Ran into a surprising hitch when Php8.5 failed unit tests despite nightly succeeding. Duplicated problem locally, and fixed it with a Phpunit upgrade. Hopefully that will work on Github as well.
2025-11-21 16:19:08 -08:00
oleibman 78190ffdb6 Prepare to Deprecate Optionality of Second Arg to Cell::setValueExplicit
In PR #4716, @RobinvanderVliet points out that Cell::setValueExplicit and Worksheet::setCellValueExplicit are strangely inconsistent, where the latter requires you to specify a DataType but the former does not. The fix in that PR is to make the latter offer a default DataType rather than requiring the parameter. While that does eliminate inconsistency, I think it does so in the wrong direction - the solution should be to eliminate the optionality in the former - an implicit value for setValueExplicit just doesn't make sense. We can't do that without a breaking change, which this is not. However, we can update the doc-block and change log to indicate our intention to make that change in the next breaking release.
2025-11-21 00:12:07 -08:00
oleibman 1e40387438 Merge pull request #4715 from RobinvanderVliet/add-bahttext-function
Implement missing `BAHTTEXT` function
2025-11-19 11:36:52 +00:00
Robin van der Vliet 576577040c Support PHP 8.1
Apparently `str_split` behaved differently on PHP 8.1 when fed an empty string.
2025-11-16 18:29:39 +01:00
Robin van der Vliet c2a00c5d7d Fix indentation 2025-11-16 18:10:04 +01:00
Robin van der Vliet 4a4eaa68b7 Document implementation of BAHTTEXT function in changelog 2025-11-16 18:06:56 +01:00
Robin van der Vliet 9aca8f3091 Merge branch 'master' into add-bahttext-function 2025-11-16 18:06:05 +01:00
Robin van der Vliet 122b36b09f Implement missing BAHTTEXT function 2025-11-16 18:02:10 +01:00
oleibman 467eada7ba Merge pull request #4714 from RobinvanderVliet/patch-1
Update changelog
2025-11-14 23:52:28 +00:00
Robin van der Vliet bd1a08a477 Update changelog 2025-11-14 23:47:21 +01:00
oleibman ee2d4e8e39 Merge pull request #4711 from oleibman/printarea
Limited PrintArea Support for Html/Pdf
2025-11-14 06:17:44 +00:00
oleibman 8108c12c35 Update CHANGELOG.md 2025-11-13 22:14:54 -08:00
oleibman dcf475eec1 Merge pull request #4713 from oleibman/calcvalue
Use `calculateFormula` Rather Than `_calculateFormulaValue` in Tests
2025-11-14 05:37:48 +00:00
oleibman 827121e6a1 Merge pull request #4708 from RobinvanderVliet/simplify-code
Apply small code style improvements
2025-11-14 05:30:07 +00:00
oleibman 965e51ccd2 Merge branch 'master' into simplify-code 2025-11-13 21:27:10 -08:00
oleibman f6f3daaac4 Merge pull request #4709 from RobinvanderVliet/add-info-function
Implement missing `INFO` function
2025-11-14 05:10:23 +00:00
oleibman 55098edf99 Minor Touchup 2025-11-13 21:07:19 -08:00
oleibman 70b4ecd4d3 Use calculateFormula Rather Than _calculateFormulaValue in Tests
They aren't quite interchangeable. Both are used in the test suite, with no indication of why one or the other. I think we'd be best off being consistent. Based on the names, I think `_calculateFormulaValue` was intended as a private, or at least internal, method, so favor `calculateFormula`. I do not intend to rename or re-categorize `_calculateFormulaValue`, just remove its usage when it isn't clearly warranted.
2025-11-13 20:48:46 -08:00
Robin van der Vliet 70802fafe6 Add another test 2025-11-13 20:43:41 +01:00
Robin van der Vliet 07d68b3bc8 Add support for remaining types 2025-11-13 19:03:21 +01:00