Commit Graph

4815 Commits

Author SHA1 Message Date
oleibman 8249cbd375 Scrutinizer 2024-08-30 12:45:34 -07:00
oleibman c11524d1a5 Performance Problem With Some Spreadsheets 2024-08-30 12:21:46 -07:00
oleibman 367c22c67e Slight Improvement to PR #4132
PR #4132 was needed for release 2.2.2 because of a problem with Excel 2016 introduced with 2.2.0. This is a minor tweak to that change - a little simpler, and possibly beneficial if the spreadsheet uses split screens.
2024-08-30 00:40:02 -07:00
oleibman f7c183b8ed Merge pull request #4137 from oleibman/fixertest
Php-cs-fixer Increase Timeout, Replace Deprecated Properties
2024-08-12 15:28:44 +00:00
oleibman b843d4e313 Merge branch 'master' into fixertest 2024-08-12 08:25:48 -07:00
oleibman b1d43ee3a3 Remove Some Commented Out Lines 2024-08-12 08:09:37 -07:00
oleibman 9bc51a18c1 Forgot One Change 2024-08-12 08:06:06 -07:00
oleibman 3e56c2da9a Php-cs-fixer Increase Timeout, Replace Deprecated Properties
I am becoming concerned with the increasing run-time of php-cs-fixer, especially since it can time out. Some relief may come from PR #4118, but that won't be merged for some time, if ever. So, bump up the timeout period now. Also replace properties which php-cs-fixer has deprecated with their non-deprecated equivalents. No change to any source code.
2024-08-12 08:01:34 -07:00
oleibman 6a8eda9f9e Merge pull request #3962 from oleibman/atsign
Excel Dynamic Arrays (Avoid Adding At-Signs to Formulas)
2024-08-12 12:48:08 +00:00
oleibman fdbf3334fd Update CHANGELOG.md 2024-08-10 00:46:13 -07:00
oleibman 823cb2d4d5 Merge branch 'master' into atsign 2024-08-09 22:34:54 -07:00
oleibman ffbcee6806 Merge pull request #4132 from oleibman/issue4128
Worksheet applyStylesFromArray Retain Active Cell
2.2.2
2024-08-08 02:31:26 +00:00
oleibman 905d93f60d Update CHANGELOG.md 2024-08-07 19:23:00 -07:00
oleibman 9450bc1acb Merge branch 'master' into issue4128 2024-08-07 11:31:01 -07:00
oleibman 4500f5a87d Worksheet applyStylesFromArray Retain Active Cell
Fix #4128. PR #4073 introduced applyStylesFromArray method, which allowed setting styles without affecting selectedCells or activeSheet. The first use of this method was in Cell setValueExplicit to set quotePrefix appropriately. The new method did not preserve activeCell. I'm not sure why that should matter, but this seems to have caused a problem for Excel 2016. This seems to be a bug in Excel, one which is fixed in newer releases. However, PhpSpreadsheet can avoid the problem by preserving activeCell as well as selectedCells and activeSheet. This PR makes that change.
2024-08-07 08:12:47 -07:00
oleibman e5e6bde299 Update Changelog and Docs Prior to Merge Next Week
This will, I hope, be my last change prior to merge on August 7. PR is fully synced with master (except for this change), and, except for an emergency, I do not intend to merge anything else before this.
2024-08-02 10:48:13 -07:00
oleibman f3ae0bd944 Merge branch 'master' into atsign 2024-08-02 09:01:06 -07:00
oleibman 1c77e00499 Merge pull request #4115 from oleibman/issue4113
New Algorithm for TRUNC, ROUNDUP, and ROUNDDOWN
2024-08-02 15:45:44 +00:00
oleibman b1e5e326ac Merge branch 'master' into issue4113 2024-08-02 08:42:52 -07:00
oleibman 2734dfd8d2 Update CHANGELOG.md 2024-08-02 08:41:48 -07:00
oleibman 4da01c3084 Merge pull request #4111 from oleibman/issue4108
Parameter Name Change Xlsx Writer Workbook
2024-08-01 21:10:16 +00:00
oleibman 3e5f1fec40 Merge branch 'master' into issue4108 2024-08-01 14:07:12 -07:00
oleibman a157e3fe7f Update CHANGELOG.md 2024-08-01 14:04:20 -07:00
oleibman 0ddaff3a21 Update Workbook.php 2024-08-01 11:59:28 -07:00
oleibman fcca8ac3cf Merge pull request #4123 from oleibman/csfixer20240801
Php-cs-fixer Enforcing New Rules
2024-08-01 18:18:33 +00:00
oleibman bbf9d15cb2 Php-cs-fixer Enforcing New Rules
The latest release seems to not want you to give a class element both a Php type and a doc-block type. I used the "fix" operand to delete the redundant doc-block declarations, with no other changes. So there should be no change to executable code.
2024-08-01 10:54:54 -07:00
oleibman 85629b77a0 More Extreme Cases 2024-07-31 12:47:19 -07:00
oleibman 768dd75ba1 Merge branch 'master' into atsign 2024-07-30 22:51:13 -07:00
oleibman 3b150557ad Merge pull request #4120 from oleibman/changelog300again
Prepare Changelog for 3.0
2024-07-31 05:39:02 +00:00
oleibman 7556b12b1b Prepare Changelog for 3.0
Also upgrade vendor modules a day ahead of Dependabot.
2024-07-30 22:22:22 -07:00
oleibman 7b478adaeb Too Many Digits
We can't handle more digits than Php allows. Neither can Excel. Just do our best without throwing an Error.
2024-07-30 21:17:50 -07:00
oleibman 523afe57f0 Merge pull request #4107 from oleibman/pr848
RATE Function Permits Floating Point NPER
2024-07-30 22:05:12 +00:00
oleibman ae2c3ea5e4 Merge pull request #4106 from oleibman/issue1284
Html Reader Preserve Unicode Whitespace Characters
2024-07-30 22:04:10 +00:00
oleibman e39dfe341f Use sprintf in Non-Locale-Aware Manner 2024-07-30 08:44:20 -07:00
oleibman 6de86f5d77 Deal With Scientific Notation 2024-07-30 07:37:57 -07:00
oleibman 58ff1491ba Additional Examples Which Were Failing 2024-07-29 08:24:56 -07:00
Adrien Crivelli a3c5c9e7ce 2.2.1 2.2.1 2024-07-29 16:56:06 +09:00
Adrien Crivelli ea97c17bca Merge pull request #4119 from PHPOffice/powerkiki
Security: prevent XXE (XML External Entity) when loading files
2024-07-29 07:50:39 +00:00
Adrien Crivelli bea2d4b30f Security: prevent XXE (XML External Entity) when loading files
Prevent XEE by hiding custom entities by using single quote to
declare a non-UTF-8 encoding.

XML standard, https://www.w3.org/TR/xml/#NT-EncodingDecl, allows single
quote to declare encoding, but we did not support it. Instead, we
incorrectly fell back on the default of UTF-8. That incorrectly kept the
XML as non-UTF-8, and thus prevented our regexp-based custom entity
detection mechanism to work.
2024-07-29 16:22:43 +09:00
oleibman b43947f4c9 Merge pull request #4101 from oleibman/issue4099
Ods Reader Allow Omission of Some Page Settings Tags
2024-07-27 14:51:24 +00:00
oleibman debb1776ef Update CHANGELOG.md 2024-07-27 07:48:40 -07:00
oleibman ab5965affb Merge branch 'master' into issue4099 2024-07-27 07:36:13 -07:00
oleibman 8225096c6f Merge pull request #4098 from oleibman/issue912
Xlsx Reader and Print/Show Gridlines
2024-07-27 14:27:18 +00:00
oleibman bf0281be34 Merge pull request #4096 from oleibman/issue296
Reference to Defined Name Specifying Worksheet Name
2024-07-27 14:25:50 +00:00
oleibman 64b02b0bc1 Merge pull request #4114 from oleibman/issue4112
Addsheet May Leave Active Sheet Uninitialized
2024-07-27 06:27:53 +00:00
oleibman f553019f95 New Algorithm for TRUNC, ROUNDUP, and ROUNDDOWN
Fix #4113. TRUNC isn't always producing the expected result. There was a promising algorithm at https://stackoverflow.com/questions/4668628/truncate-float-numbers-with-php from user Juan. It works through Php8.3, but failed in Php8.4 (more on this later). User Savageman on the same page has a solution that needs work, but, once the work had taken place, it works on Php8.1-8.4.

The ROUNDUP and ROUNDDOWN functions were adversely affected by Php8.4, probably for the same reasons as Juan's TRUNC suggestion. I put a kludge in place for them some time ago, but I wasn't happy with it. The solution used for TRUNC here suggested a change to the ROUNDUP and ROUNDDOWN code that would no longer require the kludge. The change to those functions now works more cleanly on Php8.1-8.4.
2024-07-26 23:02:11 -07:00
oleibman 459f442b9e Additional Test
New test testGifIssue4112 uses the same technique as reported in the original issue, and it would fail on all PhpSpreadsheet releases, not just 2.2.0.
2024-07-26 11:52:35 -07:00
oleibman 1df4b17d55 Scrutinizer Found a Real Problem
My test was imperfect,and Scrutinizer detected it.
2024-07-26 08:53:00 -07:00
oleibman 762d73daf5 Addsheet May Leave Active Sheet Uninitialized
Fix #4112. Direct cause is that `applyStylesFromArray` tries to save and restore `activeSheetIndex`. However, if activeSheetIndex is -1, indicating no active sheet, the restore should not be attempted. Code is changed to test before attempting to restore.

The actual problem, however, is that user specified a sheet number for `addSheet`. That method will set activeSheetIndex most of the time, but this was a gap - when the supplied sheet number (0 in this case) is greater than activeSheetIndex (-1 in this case), it was leaving activeSheetIndex as -1. It is changed to set activeSheetIndex to 0 when activeSheetIndex is negative.
2024-07-26 08:30:52 -07:00
oleibman 4db909c7bb Parameter Name Change Xlsx Writer Workbook
See issue #4108. Parameter recalcRequired is a complete misnomer. While we can get along without changing it, I think we should strive for accuracy. Execution logic is unchanged, and existing tests are adequate. This isn't really intended as a public interface, and, even if is being used by someone out there, it will be a problem only for people calling the parameter by name. So the chances of a problem are very low, and the workaround is very easy (call positionally).
2024-07-25 16:57:10 -07:00