Commit Graph

3338 Commits

Author SHA1 Message Date
MarkBaker 779a5e21be Change Log update 2022-05-06 12:44:04 +02:00
Mark Baker 56509d9a3e
Merge pull request #2808 from PHPOffice/Performance-Ods-Writer
Performance Ods/Html Writers
2022-05-06 12:42:03 +02:00
Mark Baker d4f6e78c4e
Merge branch 'master' into Performance-Ods-Writer 2022-05-06 12:32:13 +02:00
MarkBaker f9d941a3af Tweaks to HTML generation, accessing cells directly from the collection 2022-05-06 12:25:47 +02:00
MarkBaker 0dc1e9b07a Switch iterators to use foreach structure 2022-05-06 11:43:10 +02:00
Mark Baker ea165dc52a
Merge pull request #2807 from PHPOffice/Performance-CellIterator
Update get cell logic in Cell Iterators
2022-05-06 11:24:24 +02:00
MarkBaker ae09dd13e1 Update logic in Cell Iterators to use Cell Collection directly where appropriate, bypassing the overhead of additional calls through the worksheet with extra checks and validations 2022-05-06 10:11:01 +02:00
MarkBaker 7201ddd088 Update get cell logic in Cell Iterators 2022-05-05 16:53:56 +02:00
MarkBaker 4a071ce578 Update Change Log 2022-05-05 13:57:28 +02:00
Mark Baker a86ad55a4a
Merge pull request #2806 from PHPOffice/Performance-Xls-Writer
Memory Experiment in Xls Writer
2022-05-05 13:53:53 +02:00
Mark Baker b72b423309
Merge pull request #2804 from PHPOffice/Performance-Xlsx-Writer
Memory Experiment in Xlsx Writer
2022-05-05 13:49:11 +02:00
MarkBaker 1b71e75bc2 Performance Experiment for the Xls Writer, to avoid creating empty cells; and should also be slightly faster 2022-05-05 11:59:25 +02:00
MarkBaker 5ae74145de Performance Experiment for the String Table, to avoid creating empty cells; should also be slightly faster 2022-05-05 10:19:51 +02:00
MarkBaker b399c09dd5 Performance Experiment for the String Table, to avoid creating empty cells; should also be slightly faster 2022-05-05 10:05:32 +02:00
MarkBaker d686a991db Memory Experiment in Xlsx Writer 2022-05-05 09:44:41 +02:00
Mark Baker 48b5d83ee8
Merge pull request #2802 from PHPOffice/Performance-Experimental-Changes
Simplify validation of columnId/rowId values when creating a CellAddress object
2022-05-03 13:30:56 +02:00
MarkBaker e043cf3e24 Eliminate loop in `trimSheetFromCellReference()` method 2022-05-03 13:22:43 +02:00
MarkBaker b4fc92ec7e Simplify validation of columnId/rowId values when creating a CellAddress object 2022-05-03 12:13:10 +02:00
Mark Baker fde77306ff
Merge pull request #2801 from PHPOffice/ScatterChart-Point-Size
Add point size option for scatter charts
2022-05-03 09:00:44 +02:00
MarkBaker 70f5ec60d7 Add point size option for scatter charts 2022-05-03 08:47:34 +02:00
Mark Baker 853cc22913
Merge pull request #2791 from PHPOffice/Named-Range-Alias-Cell-Collection
Experiment #143 in memory saving/performance in the Cell Collection
2022-05-01 22:21:52 +02:00
Mark Baker 9b99ebda27
Merge branch 'master' into Named-Range-Alias-Cell-Collection 2022-05-01 22:09:26 +02:00
MarkBaker 4f7da29332 Minor performance tweaks 2022-05-01 21:55:37 +02:00
dependabot[bot] b38fa15c89
Bump phpstan/phpstan-phpunit from 1.1.0 to 1.1.1 (#2795)
Bumps [phpstan/phpstan-phpunit](https://github.com/phpstan/phpstan-phpunit) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/phpstan/phpstan-phpunit/releases)
- [Commits](https://github.com/phpstan/phpstan-phpunit/compare/1.1.0...1.1.1)

---
updated-dependencies:
- dependency-name: phpstan/phpstan-phpunit
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-01 09:00:18 -07:00
dependabot[bot] b9f1e8189e
Bump phpstan/phpstan from 1.5.4 to 1.6.3 (#2794)
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.5.4 to 1.6.3.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.7.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.5.4...1.6.3)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: oleibman <10341515+oleibman@users.noreply.github.com>
2022-05-01 08:46:34 -07:00
oleibman 8fc8470f81
Minor Changes for Phpstan 1.6.3 (#2797)
One doc block change, one minor code change.
2022-05-01 08:33:38 -07:00
dependabot[bot] 58cb191abc
Bump dompdf/dompdf from 1.2.1 to 1.2.2 (#2796)
Bumps [dompdf/dompdf](https://github.com/dompdf/dompdf) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/dompdf/dompdf/releases)
- [Commits](https://github.com/dompdf/dompdf/compare/v1.2.1...v1.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-01 07:37:44 -07:00
dependabot[bot] ed7efb05f0
Bump mpdf/mpdf from 8.0.17 to 8.1.1 (#2793)
Bumps [mpdf/mpdf](https://github.com/mpdf/mpdf) from 8.0.17 to 8.1.1.
- [Release notes](https://github.com/mpdf/mpdf/releases)
- [Changelog](https://github.com/mpdf/mpdf/blob/development/CHANGELOG.md)
- [Commits](https://github.com/mpdf/mpdf/compare/v8.0.17...v8.1.1)

---
updated-dependencies:
- dependency-name: mpdf/mpdf
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-01 07:17:07 -07:00
MarkBaker 3db129dc52 Update to cloning the Cell Collection 2022-05-01 14:02:23 +02:00
MarkBaker 5112503a06 Merge branch 'master' into Named-Range-Alias-Cell-Collection 2022-05-01 09:14:38 +02:00
oleibman 766252ccb0
Real Errors Identified in Calculation by Scrutinizer (#2774)
* Real Errors Identified in Calculation by Scrutinizer

Before Scrutinizer broke, I took a look at the remaining 43 errors which it categorized as 'major'. Most of these were false positives, but, in the case of Calculation and Reader/Xlsx/Chart, I was able to determine that its analysis of some of the problems was correct. There is little point addressing the false positives until it starts working again, but we should fix the real errors.

This PR addresses the real errors in Calculation.
- A test for `$pCellParent` should have been a test  for `$pCellWorksheet`.
- A test for `$operand1Data['reference']` should have been a test for `$operand1Data['value']`.
- A test for `$operand2Data['reference']` should have been a test for `$operand2Data['value']`.

* Fix Attempt to Erroneously Call trim on Array

Fix #2780. Warning message is being issued when getting calculated value of cell with value `=INDIRECT(ADDRESS(ROW(),COLUMN()-2))/$C$4`. This appears to be the case for all recent (and probably not so recent) releases; it is not a result of changes to the code base. Fix added to this PR because the erring section of code was proximate to code already changed in the PR. Test added.

* Minor Code Changes

Apply some suggestions from @MarkBaker
2022-04-30 19:13:17 -07:00
oleibman 0a531cf1cd
Replace 'self' with self::class in 2 Modules (#2773)
PHP 8.2 is supposed to deprecate the use of `['self', 'functionname']` for callables, suggesting the use of `[self::class, 'functionname']` instead. We made this change in a recent PR, and, while I'm thinking about it, I'll fix the remaining 2 modules with this construction. Vlookup is already adequately covered in unit tests. Reader/Xls/MD5 is not; a unit test is added.
2022-04-30 18:36:24 -07:00
oleibman 450873b5fa
Real Errors Identified in Calculation by Scrutinizer (#2775)
Before Scrutinizer broke, I took a look at the remaining 43 errors which it categorized as 'major'. Most of these were false positives, but, in the case of Calculation and Reader/Xlsx/Chart, I was able to determine that its analysis of some of the problems was correct. There is little point addressing the false positives until it starts working again, but we should fix the real errors.

This PR addresses the real errors in Reader/Xlsx/Chart.
- An assignment to `$XaxisLable` should be an assignment to `$XaxisLabel`.
- An assignment to `$YaxisLable` should be an assignment to `$YaxisLabel`.
2022-04-30 17:43:18 -07:00
MarkBaker 32559b44a3 Use the call to Coordinate::coordinateFromString() to validate the coordinate passed to createNewCell() _before_ we try adding it to the Collection 2022-04-30 20:14:36 +02:00
MarkBaker e3a6bc1e4c We should still get an exception for invalid named ranges, but I'm suppressing the message check temporarily in the tests until I can investigate why we're getting 'Column string index can not be longer than 3 characters' instead of 'Invalid cell coordinate XXXX'.
The memory and execution speeds alone make this worthwhile.
2022-04-30 17:29:45 +02:00
MarkBaker b34f0a96a7 More significant reductions in memory usage for peaks, and faster execution times for key Cell Collection methods 2022-04-30 17:07:24 +02:00
Mark Baker 7169648a64
Merge pull request #2786 from PHPOffice/Cell-Collection-Memory-Experiments
Improve memory performance for getSortedCoordinates() in the Cell Collection
2022-04-28 20:02:38 +02:00
MarkBaker 45be09e98b Minor tweaks to execution speed, including eliminating a method call on storing a cell 2022-04-28 19:43:12 +02:00
MarkBaker 0171709e7f The `sortCellReferenceArray()` in `Coordinate` should have returned cells ordered by row, then by column... but instead sorted by column, then row.
Fixed that bug, using a slightly faster algorithm for the sort index than the simple fix would have used, and modified the tests that didn't have the correct expected result :-(
2022-04-28 17:43:01 +02:00
MarkBaker 1924f3c1d7 Improved memory performance for getSortedCoordinates() in the Cell Collection; with minimal execution time overhead.
This is an important method, as it's called by the Reference Helper and for the Writer save() method; so users should see that improvement.
2022-04-28 16:02:49 +02:00
Mark Baker 533f41f879
Merge pull request #2782 from PHPOffice/New-Excel-Functions
Add "Not yet Implemented" stubs for 14 new Excel Functions
2022-04-27 12:44:12 +02:00
MarkBaker 6b1be8c09f Add "Not yet Implemented" stubs for 14 new Excel Functions
- TEXTBEFORE – Returns text that’s before delimiting characters
- TEXTAFTER – Returns text that’s after delimiting character
- TEXTSPLIT – Splits text into rows or columns using delimiters
- VSTACK – Stacks arrays vertically
- HSTACK – Stacks arrays horizontally
- TOROW – Returns the array as one row
- TOCOL – Returns the array as one column
- WRAPROWS – Wraps a row array into a 2D array
- WRAPCOLS – Wraps a column array into a 2D array
- TAKE – Returns rows or columns from array start or end
- DROP – Drops rows or columns from array start or end
- CHOOSEROWS – Returns the specified rows from an array
- CHOOSECOLS – Returns the specified columns from an array
- EXPAND – Expands an array to the specified dimensions
2022-04-27 12:25:18 +02:00
MarkBaker bbebc0e5b7 Prepare Change Log for next Release 2022-04-24 16:19:39 +02:00
MarkBaker 21e4cf6269 Prepare Change Log for Release 2022-04-24 15:53:10 +02:00
MarkBaker b72d91116f Update Change Log 2022-04-24 11:36:47 +02:00
Mark Baker 763e0de229
Merge pull request #2772 from oleibman/issue2768
Time Interval Formatting
2022-04-24 11:32:11 +02:00
Mark Baker da76f0d977
Merge branch 'master' into issue2768 2022-04-24 11:26:52 +02:00
oleibman c286fb8957 Minor Changes
Apply some suggestions from @MarkBaker
2022-04-23 21:42:32 -07:00
oleibman 7fe5ee84ea Time Interval Formatting
Fix #2768. DateFormatter handles only one of six special formats for time intervals `[h] [hh] [m] [mm] [s] [ss]`. This PR extends support to the rest. There should be no more than one of these in any format string. Although it certainly could make sense to treat `[d] [dd]` in the same manner, Excel does not seem to support those.

Interesting observations - hours and minutes are truncated (presumably because they may be followed by minutes and seconds), but seconds are rounded. Also, there are some floating point issues, which fortunately showed up for the example in the original issue. There, the time interval was 1.15, which should evaluate to a minutes value of 1656 (as it does in Excel). However, on my system it evaluated to 1655 because of a rounding error in the 13th decimal place. To overcome this, values are rounded to 10 decimal places before truncating.
2022-04-23 11:12:46 -07:00
MarkBaker 27221ee8cf Update Change Log 2022-04-23 19:44:41 +02:00