Commit Graph

6437 Commits

Author SHA1 Message Date
oleibman 7d0f2ad706 Avoid Hard-Coding Some Chart Xml Attributes
Writer/Xlsx/Chart hard-codes a lot of output values. While nobody has reported a problem involving these, it makes sense to me to copy those values over from what Xlsx/Reader/Chart read, rather than hard-coding them. This involves adding some new properties to Chart and Layout, all, naturally, initialized to the values that we have been hard-coding.
- Chart\date1904
- Chart\lang
- Chart\pageMargins
- Chart\pageSetup
- Layout\bodyPr

With one exception, I have not investigated any of the new properties in depth. That may come in time. The one I did look at is `date1904`. Chances are that it should match the equivalent spreadsheet setting, but it won't matter if there are no dates on your chart, and it often won't matter even if you do. It may well matter if you are using a `date axis`. While looking into that, it became apparent that some Shared Date conversions need to be a bit more flexible, specifying an optional `calendar` parameter rather than relying on the Spreadsheet `calendar` (which is not accessible while processing the chart) or the Shared\Date `calendar` (which is accessible).
2026-06-16 20:08:46 -07:00
oleibman 96fbeaac0a Merge pull request #4913 from oleibman/changelog20260612
Update Changelog
2026-06-13 03:54:40 +00:00
oleibman 99b0d93026 Update Changelog 2026-06-12 20:38:46 -07:00
oleibman 8aadd70f9a Merge pull request #4912 from oleibman/issue434
Tighten Up Writer Html Logic
2026-06-13 03:37:04 +00:00
oleibman c5e0e261d5 Merge pull request #4911 from oleibman/issue413
Chart DataTable
2026-06-13 03:36:44 +00:00
oleibman 961346a5d7 Merge pull request #4910 from oleibman/issue411
Allow Use of Multiple Ranges When Setting Style
2026-06-13 03:36:23 +00:00
oleibman 7a4574dcd1 Merge pull request #4909 from oleibman/issue863
Navigate Cell as Cursor
2026-06-13 03:35:59 +00:00
oleibman 355013c981 Merge pull request #4908 from oleibman/issue661
No lumOff for Radar Charts
2026-06-13 03:35:32 +00:00
oleibman db8917cd4b Tighten Up Writer Html Logic
Fix #434, which went stale in 2018 and is now reopened. User reported a fatal error in Writer/Html. Regrettably, there is no example code/spreadsheet to illustrate the error. However, the area of code where the error happened is identified. Studying that, it was clear that the error could be avoided through the use of the nullsafe operator `?->` without any performance hit, while making the resulting code a little clearer.
2026-06-11 06:54:43 -07:00
oleibman dbea64cb03 Chart DataTable
Fix #413, which went stale in 2018 and is now reopened. A DataTable can be used on a chart in place of a Legend (or in addition to one, but it doesn't really make sense to have both). The fix was substantially developed by @topaDev before the issue went stale. This PR provides basic support for reading and writing DataTables on charts. The new sample on this PR shows them in action. They have obscure features which are not implemented (e.g. `glow`); those will have to wait for another day.
2026-06-11 06:43:42 -07:00
oleibman a028eea314 Allow Use of Multiple Ranges When Setting Style
Fix #411, which went stale in 2018 and is now reopened. You can get a style for a set of cells which uses multiple ranges, e.g. `A1:B2,C5:H10`, but we throw an exception if you try to change the style. I don't know how useful that is, but it's been requested and it's pretty easy to implement with recursion.

The comma in the ranges represents the `union` operator. `getStyle` is very permissive - it will allow almost anything to be specified. However, attempts to use a space as the `intersection` operator, or, indeed, many other nonsense strings, will still be permitted for `getStyle` but will continue to throw an Exception if an attempt is made to alter the style.
2026-06-11 06:30:20 -07:00
oleibman 46f4b8995a Additional Methods and Tests 2026-06-10 13:30:10 -07:00
oleibman b65783bdeb Navigate Cell as Cursor
Fix #863, which went stale in 2019 and is now reopened. Add methods to `Cell` which operate in a cursor-like manner, allowing you to change to cells on the right, left, down, or up.
2026-06-09 17:02:05 -07:00
oleibman 6a0d4ff527 No lumOff for Radar Charts
Fix #661 (marked stale in 2018, but now reopened). That issue was already mostly resolved by many changes to Xlsx Chart Writer logic some time ago. However, a new problem popped up. PR #2950 added `brightness` logic to Xlsx Reader and Writer. That was done primarily for the benefit of scatter charts. Xlsx Writer writes two brightness properties `lumMod` and `lumOff`. These values are complete complementary (if you know one, you know the other), so I am not sure why both are needed, but my scatter chart testing indicated that they were. It turns out that Radar charts can also set brightness, but, if the writer specifies both `lumMod` and `lumOff`, the resulting chart is slightly off. There may be more to this, but that's all I can deal with for now - I suppress writing `lumOff` if we're writing a radar chart. If there are other problems in this area, I will wait for them to be reported. None of the existing radar chart samples used the brightness properties; however, the example attached to 661 did. It is added as a new Sample, and tests are added.
2026-06-09 12:26:11 -07:00
oleibman fd5f72edd7 Merge pull request #4906 from oleibman/strikesubsup
Minor Coverage Improvement Reader/Xlsx
2026-06-08 03:21:59 +00:00
oleibman 1f7dd42482 Minor Coverage Improvement Reader/Xlsx 2026-06-07 20:03:44 -07:00
oleibman 4f920ccc57 Merge pull request #4830 from kemo/perf/xlsx-xmlreader-streaming
Restructure Xlsx Reader Parser Allowing Experimental Streaming Mode
2026-06-07 14:42:58 +00:00
oleibman a4346ec600 Update CHANGELOG.md 2026-06-07 07:39:05 -07:00
oleibman 45f6b78792 Merge branch 'master' into perf/xlsx-xmlreader-streaming 2026-06-07 07:10:21 -07:00
oleibman 54e28ff8ca Merge pull request #4827 from kemo/perf/csv-streaming-encoding
Experimental Stream encoding conversion in CSV reader to reduce peak memory
2026-06-07 14:01:26 +00:00
oleibman fd773844c2 Merge branch 'master' into perf/csv-streaming-encoding 2026-06-07 06:57:32 -07:00
oleibman e7067ecf9a Merge pull request #4905 from oleibman/stan20260606
Update Phpstan
2026-06-07 06:32:03 +00:00
oleibman 1571b81ab8 Update Phpstan 2026-06-06 23:14:42 -07:00
oleibman 01964d9253 Merge pull request #4904 from oleibman/changelog20260606
Update Changelog for New Release
5.8.0
2026-06-07 03:51:10 +00:00
oleibman 2a4a2967f2 Update Changelog for New Release 2026-06-06 20:46:14 -07:00
oleibman bab9199ea1 Merge pull request #4903 from PHPOffice/dependabot/github_actions/peaceiris/actions-gh-pages-4
Bump peaceiris/actions-gh-pages from 3 to 4
2026-06-07 03:24:08 +00:00
oleibman 22991079b3 Merge pull request #4902 from PHPOffice/dependabot/github_actions/actions/checkout-6
Bump actions/checkout from 4 to 6
2026-06-07 03:23:03 +00:00
oleibman 0b733f7f0a Merge pull request #4900 from PHPOffice/dependabot/composer/friendsofphp/php-cs-fixer-3.95.4
Bump friendsofphp/php-cs-fixer from 3.95.3 to 3.95.4
2026-06-07 03:22:32 +00:00
dependabot[bot] d6baecae4d Bump peaceiris/actions-gh-pages from 3 to 4
Bumps [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) from 3 to 4.
- [Release notes](https://github.com/peaceiris/actions-gh-pages/releases)
- [Changelog](https://github.com/peaceiris/actions-gh-pages/blob/main/CHANGELOG.md)
- [Commits](https://github.com/peaceiris/actions-gh-pages/compare/v3...v4)

---
updated-dependencies:
- dependency-name: peaceiris/actions-gh-pages
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-07 02:55:47 +00:00
dependabot[bot] e22244932b Bump actions/checkout from 4 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-07 02:55:44 +00:00
dependabot[bot] aea5b934fe Bump friendsofphp/php-cs-fixer from 3.95.3 to 3.95.4
Bumps [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) from 3.95.3 to 3.95.4.
- [Release notes](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases)
- [Changelog](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.95.3...v3.95.4)

---
updated-dependencies:
- dependency-name: friendsofphp/php-cs-fixer
  dependency-version: 3.95.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-07 02:55:01 +00:00
oleibman 5f097568fc Merge pull request #4896 from oleibman/chartindex
getChartIndex
2026-06-07 02:50:44 +00:00
oleibman 649afb9339 Merge pull request #4895 from oleibman/internalhandler
Make Helper/Handler Internal and Final
2026-06-07 02:49:07 +00:00
oleibman b3cb1e9105 Merge pull request #4899 from AJenbo/patch-1
Document exception in IOFactory.php
2026-06-06 15:58:31 +00:00
Anders Jenbo c66fe74303 Document exception in IOFactory.php 2026-06-06 17:09:35 +02:00
oleibman fdbe4b538a Mystery Problem with ReadTheDocs 2026-06-04 22:20:47 -07:00
oleibman cc3ec6c03c Doc Tweak 2026-06-04 21:58:06 -07:00
oleibman 45b9df30ba Update Changelog 2026-06-04 16:39:56 -07:00
oleibman 9698573e32 getChartIndex
It requires an index to an array which needs to be supplied as a string, even though the array is indexed exclusively by int. It is called only once in the code base, by some inefficient code which becomes much simpler when restructured and eliminates the call altogether. It is not independently tested. The use case for its existence is not clear. It should probably just be deprecated. However, for now, I'm just allowing the parameter to be int|string, rather than just string, and adding tests.
2026-06-04 12:40:57 -07:00
oleibman 8290604876 Make Helper/Handler Internal and Final
Needed for testing purposes, but no reason why anyone should use or extend it.
2026-06-04 11:49:51 -07:00
oleibman 89c3b39d35 Merge pull request #4891 from oleibman/issue4889
Bug in FIXED Function
2026-06-01 15:34:04 +00:00
oleibman d80d762af1 Merge branch 'master' into issue4889 2026-06-01 08:06:46 -07:00
oleibman 9633d0ff05 Tweak 2026-06-01 07:44:41 -07:00
oleibman ad2285dac7 Merge pull request #4892 from oleibman/stanchanges
Phpstan Changes
2026-06-01 13:53:56 +00:00
oleibman 14a641f924 Phpstan Changes
A large volume of changes due to "sealed" arrays. Some are sensible; some are very confusing and are handled with `ignore` annotations.

Modules in src with changed code (as opposed to doc-blocks or annotations) are:

- DateTimeExcelDays
- Reader/Xlsx
- Reader/Xlsx/AutoFilter
- Reader/Xlsx/Chart
- Reader/Xlsx/ConditionalStyles
- Reader/Xlsx/TableReader
2026-06-01 01:14:59 -07:00
oleibman 38f346661b Bug in FIXED Function
Fix #4889. Function was not outputting correct number of decimals when thousands separator was omitted.
2026-05-31 09:26:18 -07:00
oleibman 9260bd841f Merge pull request #4886 from oleibman/ireader2
Add IReader2 Interface with listWorksheetInfo/Names
2026-05-31 15:52:34 +00:00
oleibman 668106c685 Update CHANGELOG.md 2026-05-31 08:48:55 -07:00
oleibman e322f54078 Merge pull request #4877 from oleibman/issue4875
Html Writer Apply Rotation To Images
2026-05-31 15:00:47 +00:00
oleibman 6762ce0cbf Update CHANGELOG.md 2026-05-31 07:57:02 -07:00