Commit Graph

5845 Commits

Author SHA1 Message Date
Nebojša Zlatanović 387ed72ca4 Fix BIFF8 DIMENSIONS record to use 0-based column indices
The XLS writer incorrectly used 1-based column indices in the BIFF8
DIMENSIONS record, violating the Microsoft Excel Binary File Format
specification which requires 0-based indices.

This bug caused an extra empty column to appear when converting XLS
files to other formats (e.g., CSV).

Changes:
- Modified column index initialization to subtract 1 from the result
  of Coordinate::columnIndexFromString() to convert from 1-based to
  0-based indexing
- Updated COLINFO loop to use the corrected 0-based lastColumnIndex

Per BIFF8 specification:
- colMic (first column) must be 0-based
- colMac (column after last column) must be 0-based

Example: For columns A-G (7 columns):
- Before: colMic=1, colMac=8 (incorrect)
- After:  colMic=0, colMac=7 (correct)

Fixes #4682
2025-10-17 08:52:44 +02:00
oleibman eecfb6712d Merge pull request #4685 from oleibman/mito105_master
Upgrade Mitoteam for Php8.5 master
2025-10-16 15:34:20 +00:00
oleibman 17e486f75a Upgrade Mitoteam for Php8.5 master 2025-10-16 08:14:29 -07:00
oleibman b100d21779 Merge pull request #4675 from oleibman/issue4673
More Sophisticated Workbook Password Algorithms (Xlsx only)
2025-10-12 23:38:00 +00:00
oleibman 12ac9529b2 Update CHANGELOG.md 2025-10-12 16:34:55 -07:00
oleibman fba2a43c8c Merge branch 'master' into issue4673 2025-10-12 15:21:52 -07:00
oleibman b5ba4ffa24 Merge pull request #4655 from oleibman/issue850
Better Support For Style Alignment Read Order
2025-10-11 19:26:32 +00:00
oleibman 5d0e2bda18 Update CHANGELOG.md 2025-10-11 12:23:38 -07:00
oleibman d52dbaa632 Merge pull request #4666 from oleibman/tcpdfnodie
Offer Tcpdf Interface Which Throws Exception Rather than Die
2025-10-11 18:47:10 +00:00
oleibman 7c9f42e9ea Merge pull request #4676 from oziriemeka/fix/4505-vml-namespace
Xlsx: register x and o namespaces for VML shapes; add test for #4505
2025-10-11 18:38:00 +00:00
oleibman db1aba6554 Better Sample File 2025-10-09 08:19:12 -07:00
oleibman ade225f610 Merge pull request #4669 from karrakoliko/fix-undefined-array-key-x
fix: do not trigger `Undefined array key "x"`
2025-10-07 14:38:50 +00:00
oleibman 4c79da5166 Merge branch 'master' into issue4673 2025-10-05 12:28:50 -07:00
karrakoliko b8687edd53 fix: do not trigger Undefined array key "x" 2025-10-04 16:15:27 +07:00
oleibman 4b24f82422 Merge pull request #4678 from oleibman/continueonerror
Account Better for Coveralls Failure
2025-10-04 03:44:39 +00:00
oleibman c396f5f34e Use Coveralls Parameter Rather than Github's 2025-10-03 20:19:40 -07:00
oleibman be22081946 Account Better for Coveralls Failure 2025-10-03 18:16:05 -07:00
Emeka Oziri 8fcde62db6 Xlsx: register x and o namespaces for VML shapes; add test for #4505
Fixes SimpleXMLElement::xpath(): Undefined namespace prefix when reading VML comments/shapes by registering x: (Excel) and o: (Office) namespaces alongside v:.

Includes:
- tests/PhpSpreadsheetTests/Reader/Xlsx/Issue4505Test.php
- tests/data/Reader/XLSX/issue.4505.xlsx

Refs: https://github.com/PHPOffice/PhpSpreadsheet/issues/4505
2025-10-03 23:37:56 +01:00
oleibman 08a6e7549f More Sophisticated Workbook Password Algorithms (Xlsx only)
Fix #4673. Our password hasher can handle different algorithms, but the workbook password (for maintaining the structure of the workbook, not for encrypting the entire workbook) currently supports only the single algorithm that was in place many years ago. Expand it, and Xlsx Reader and Writer, to be able to use, say, SHA-512, which is what Excel itself uses.

The revisions password needs to be expanded in the same way as the workbook password. It is used for file sharing, but MS has deprecated it because it feels that modern technologies introduce better ways to accomplish what it was needed for. You'll need to look pretty hard to even find it in Excel - it's not, for example, on any of the ribbons. Nevertheless, the solution here is pretty much identical to the solution for the workbook password, so I am fixing it at the same time.
2025-10-03 13:07:36 -07:00
oleibman 0c459cbd5d Merge pull request #4674 from oleibman/stan20251001
Phpstan Update
2025-10-01 16:12:04 +00:00
oleibman 14ad63c56a Phpstan Update 2025-10-01 09:08:10 -07:00
oleibman 228bbed026 Merge pull request #4671 from PHPOffice/dependabot/composer/friendsofphp/php-cs-fixer-3.88.2
Bump friendsofphp/php-cs-fixer from 3.85.1 to 3.88.2
2025-10-01 14:49:23 +00:00
oleibman a57275b4ec Merge pull request #4672 from PHPOffice/dependabot/composer/dompdf/dompdf-3.1.2
Bump dompdf/dompdf from 3.1.1 to 3.1.2
2025-10-01 14:48:55 +00:00
dependabot[bot] 3aa80e7150 Bump dompdf/dompdf from 3.1.1 to 3.1.2
Bumps [dompdf/dompdf](https://github.com/dompdf/dompdf) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/dompdf/dompdf/releases)
- [Commits](https://github.com/dompdf/dompdf/compare/v3.1.1...v3.1.2)

---
updated-dependencies:
- dependency-name: dompdf/dompdf
  dependency-version: 3.1.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 11:01:38 +00:00
dependabot[bot] 632b898298 Bump friendsofphp/php-cs-fixer from 3.85.1 to 3.88.2
Bumps [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) from 3.85.1 to 3.88.2.
- [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.85.1...v3.88.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 11:01:34 +00:00
oleibman b1c5c64060 Tweak 2025-09-30 07:33:04 -07:00
oleibman a1ffd3473b Offer Tcpdf Interface Which Throws Exception Rather than Die
By default, TCPDF will die sometimes rather than throwing exception. And this is controlled by a defined constant in the global namespace, not by an instance property. Ugh! Using this class instead of the class which it extends will probably be suitable for most users. But not for those who have customized their config file. Which is why this isn't the default, so that there is no breaking change for those users. Note that if both TCPDF and TcpdfNoDie are used in the same process, the first one used "wins" the battle of the defines.
2025-09-29 22:25:20 -07:00
oleibman 0650e78474 Merge branch 'master' into issue850 2025-09-25 09:27:10 -07:00
oleibman 4fc82f4784 Merge pull request #4663 from oleibman/tweakcoveralls
Tweak Coveralls
2025-09-25 16:20:10 +00:00
oleibman 8e9fe8b5f7 Tweak Coveralls
Coveralls recommends using an "official integration" of their product with Github. Also, allow the upload to fail without causing the whole coverage step to fail - there have been some recent problems which they are still working on. I may allow the step to fail once they are done with their changes.
2025-09-25 08:57:42 -07:00
oleibman e3cac6f1ff Merge pull request #4659 from oleibman/dompdf311
Update to Php8.5-compatible Dompdf
2025-09-22 02:21:58 +00:00
oleibman 93e715f743 Update to Php8.5-compatible Dompdf 2025-09-21 19:00:51 -07:00
oleibman 3c645277b5 Merge pull request #4653 from oleibman/extintl
Document NumberFormat Wizard Dependency on Intl Extension
2025-09-21 02:59:41 +00:00
oleibman b982ef9a70 Merge pull request #4648 from oleibman/issue4647
Drowning in Warning Messages with Corrupt Xls File
2025-09-21 02:49:06 +00:00
oleibman ac700e6450 Merge branch 'master' into issue4647 2025-09-20 19:46:09 -07:00
oleibman 296ef96015 Update CHANGELOG.md 2025-09-20 19:45:18 -07:00
oleibman 8c70086f0e Html Better Support for Indent 2025-09-20 15:26:49 -07:00
oleibman 9601d879c8 Fix Typo 2025-09-19 14:23:10 -07:00
oleibman dbff58a532 Better Support For Style Alignment Read Order
Fix #850 (marked stale many years ago, but now reopened). User had a typo in their script which would have caused problems no matter what. However, it exposed another problem. Style Alignment Read Order was supported only by the Xlsx Reader and Writer, but it could have been supported pretty easily for most other formats. This PR adds support for the following:

- Xls (read and write)
- Html (write, and read using inline styles). Html reader does not yet process most classes.
- Pdf (write). PhpSpreadsheet does not have a Pdf reader.
- Ods (write). PhpSpreadsheet does not yet support reading most Ods styles.
- Xml (read). PhpSpreadsheet does not have an Xml writer.
- Gnumeric (no change). It appears that the Gnumeric product does not support this attribute.
- Csv (no change). Csv does not support any styles.
- Slk (no change). Slk does not support non-Latin characters, so this attribute doesn't make sense for it.
2025-09-19 14:15:05 -07:00
oleibman 684c677937 Document NumberFormat Wizard Dependency on Intl Extension
Intl is only a "suggested" extension. A lot of the NumberFormat Wizard code depends on it. That's insufficient reason to make it required, but the suggestion text now mentions this dependency explicitly. Also clean up the Wizard documentation to reflect some changes since PhpSpreadsheet 1.28.
2025-09-17 23:04:31 -07:00
oleibman 21ef57e46d Merge pull request #4650 from oleibman/phpunitupdate
Update Phpunit
2025-09-17 18:24:31 +00:00
oleibman 6f43a3d102 Update Phpunit
Testing is becoming too messy otherwise as Php8.5 approaches.
2025-09-17 10:53:28 -07:00
oleibman 9c8f83fcbf Merge pull request #4649 from oleibman/mpdford
Temporary Workaround for Mpdf Php8.5 Deprecation
2025-09-17 17:01:56 +00:00
oleibman a76c9b82cd Upgrade Mitoteam to Beta Version
I had been trapping its errors in test bootstrap, but that no longer seems to work.
2025-09-17 09:42:23 -07:00
oleibman e73fc333af Temporary Workaround for Mpdf Php8.5 Deprecation 2025-09-17 07:53:53 -07:00
oleibman c8a1a5fd11 Merge pull request #4645 from oleibman/issue4584
Wrapped Cells and Default Row Height
2025-09-17 06:51:49 +00:00
oleibman fff2373b39 Merge branch 'master' into issue4584 2025-09-16 23:48:50 -07:00
oleibman ecc6f2f404 Update CHANGELOG.md 2025-09-16 23:47:55 -07:00
oleibman f467ac59fb Merge pull request #4596 from oleibman/intersect
Some Additional Support for Intersection and Union
2025-09-17 00:57:00 +00:00
oleibman 4fe13f06eb Update CHANGELOG.md 2025-09-16 17:54:10 -07:00