Commit Graph

3558 Commits

Author SHA1 Message Date
aswinkumar863 ea3263650b
Minimum Table range validation
Range must be at least 1 column and 2 rows
2022-04-17 17:45:17 +05:30
aswinkumar863 3c4a51acb5
Minor refactoring work
testColumnInRange method renamed to isColumnInRange
2022-04-17 17:43:32 +05:30
aswinkumar863 3a6ebc0ce6
Fixed coding standard with strict comparisons 2022-04-17 17:42:35 +05:30
aswinkumar863 8889ecf044
Support UTF-8 Table names
Added support for UTF-8 Table names (including
combined character)
2022-04-17 17:41:49 +05:30
Mark Baker 9caa827f41
Merge pull request #2753 from PHPOffice/Issue-2346_Column-Dimensions-for-Ods-Writer
Ods Writer support for setting column width/row height
2022-04-17 11:43:27 +02:00
MarkBaker 7a2f5c4ccc Ods Writer support for setting column width/row height (including Autosizing) 2022-04-17 11:34:39 +02:00
aswinkumar863 59083263e1
Merge branch 'PHPOffice:master' into Table-for-Xlsx 2022-04-16 18:46:32 +05:30
Mark Baker de173d4705
Merge pull request #2751 from PHPOffice/CalcEngine-Bugfix-Row-Column-Ranges
Resolve Calculation Engine bug with row and column ranges being identified as named ranges
2022-04-15 15:10:38 +02:00
MarkBaker 716964eeec Resolve Calculation Engine bug with row and column ranges being identified as named ranges, adding overhead with the additional validation to process that named range 2022-04-15 14:53:33 +02:00
Mark Baker 4a28fd6eec
Merge pull request #2749 from PHPOffice/CalcEngine-Parser-Unit_Tests
Basic unit tests for formula parsing
2022-04-14 22:53:27 +02:00
MarkBaker 483ef53855 Basic unit tests for formula parsing, in preparation for work on fully supporting the Union Operator, and for providing support for Structured References 2022-04-14 22:38:19 +02:00
Mark Baker 709e2ae5ca
Merge pull request #2748 from PHPOffice/Resolve-Issue-with-Boolean-in-Branch-Pruning
Resolve issue with boolean in branch pruning when array is expected
2022-04-13 20:27:19 +02:00
MarkBaker abaa102919 Resolve issue with boolean in branch pruning when array is expected 2022-04-13 20:18:21 +02:00
MarkBaker 19988626d4 Fix change log typo 2022-04-13 18:17:29 +02:00
Mark Baker d4585ed0c6
Merge pull request #2746 from PHPOffice/Issue-2730_Combined-Ranges
Support for "chained" range operators in the Calculation Engine
2022-04-13 18:16:14 +02:00
Mark Baker 8b83e8ac4c
Merge branch 'master' into Issue-2730_Combined-Ranges 2022-04-13 18:04:00 +02:00
MarkBaker 40730c6023 Handle defined names with the range operator.
It gets awkward when the defined name is for an actual range rather than for an individual named cell; because we need to manipulate the stack when that happens.

The code is ugly, and this is a rather simplistic approach, but it works as long as the named range is a cell, a cell range, or even a "chained" range - it won't work if we have union or intersection operators in the defined range - but it does provide formula support that never existed before.
2022-04-13 17:55:51 +02:00
Mark Baker 4856376024
Merge pull request #2739 from mjan4175/fix-external-sheet-column-styles
Fix invalid styles in empty columns and rows of added external sheet.
2022-04-13 12:39:40 +02:00
MarkBaker 8c84ce4399 Support for chained range operators in the Calculation Engine (e.g. `A3:B1:C2` which gives an effective combined range of `A1:C3` or `A5:C10:C20:F1` which gives an effective combined range of `A1:F20`).
Next step will be allowing Named Cells/Ranges to be chained in the same way.
2022-04-13 12:29:59 +02:00
Mark Baker 2f52cd8644
Merge branch 'master' into fix-external-sheet-column-styles 2022-04-13 12:25:32 +02:00
mjan4175 c214a199d6 FIX: Coding style 2022-04-12 19:53:21 +02:00
mjan4175 5f317250b3 CHANGELOG.md contribution 2022-04-12 19:43:42 +02:00
mjan4175 e41fdf4909 FIX: Invalid styles in rowDimensions of added external sheet. 2022-04-12 13:38:19 +02:00
Mark Baker a6cb80fd4c
Merge pull request #2718 from PHPOffice/CellAddress-object
Initial work on deprecating `ByColumnAndRow` methods in Worksheet
2022-04-12 08:46:55 +02:00
MarkBaker f672734258 Typo 2022-04-12 08:35:40 +02:00
Mark Baker 3becd5696a
Merge branch 'master' into CellAddress-object 2022-04-12 08:30:33 +02:00
mjan4175 5719b21341 FIX: Changelog revert unwanted changes 2022-04-11 09:39:53 +02:00
mjan4175 43e0e64cd4 CHANGELOG.md contribution 2022-04-11 09:31:07 +02:00
mjan4175 31ca617570 FIX: Data types in tests 2022-04-11 09:06:38 +02:00
mjan4175 bb4a22d5e9 FIX: Coding style in tests 2022-04-11 08:56:42 +02:00
mjan4175 812c14a6ad Fix invalid styles in empty columns of added external sheet. 2022-04-11 08:50:28 +02:00
dependabot[bot] c6858885c0
Bump phpstan/phpstan-phpunit from 1.0.0 to 1.1.0 (#2720)
Bumps [phpstan/phpstan-phpunit](https://github.com/phpstan/phpstan-phpunit) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/phpstan/phpstan-phpunit/releases)
- [Commits](https://github.com/phpstan/phpstan-phpunit/compare/1.0.0...1.1.0)

---
updated-dependencies:
- dependency-name: phpstan/phpstan-phpunit
  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-04-10 18:03:04 -07:00
oleibman 2370a88c96
Trivial Change to Unblock Phpstan Update (#2737)
I cannot duplicate the problem blocking #2720, but this trivial change should work anyhow.
2022-04-10 17:31:53 -07:00
dependabot[bot] b03788c902
Bump phpstan/phpstan from 1.4.6 to 1.5.3 (#2719)
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.4.6 to 1.5.3.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.6.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.4.6...1.5.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-04-10 08:25:24 -07:00
oleibman 64e61d8dec
Prep Work for Phpstan Upgrade (#2728)
Dependabot submitted PRs #2719 and #2720 to upgrade Phpstan. As with most Phpstan upgrades, there are new error messages; this PR is an attempt to fix all 58 of the new problems in order to allow the upgrade to proceed.

Most of these fixes involve the addition of doc-block type annotations, often involving the assignment of the 'objectionable' portion of the statement to a new variable. Some use explicit casting when I am sure that's safe. Some (Reader/Ods) involve defeating result caching by Phpstan.
2022-04-10 08:14:05 -07:00
MarkBaker 83aaf32161 Handle selected cells 2022-04-06 20:37:13 +02:00
aswinkumar863 4db82032b4
Remove table by name cs fix 2022-04-03 18:51:06 +05:30
aswinkumar863 feffb76944
Added Column Formula
Option to add column formula that applied automatically
for any new rows added to the table range
2022-04-03 18:27:38 +05:30
aswinkumar863 bc6ec1932a
Auto adjust table range using ReferenceHelper
Automatically adjusts table range on insertion and
deletion of rows and columns within table range
2022-04-03 18:27:00 +05:30
aswinkumar863 50b91e8ede
Remove table By name
Option to remove the table from table collection of
worksheet
2022-04-03 18:24:38 +05:30
aswinkumar863 3c3d949a5d
Added table name validation
Validation added for
- invalid characters
- invalid names ("C", "c", "R", or "r")
- cell references
- space separate words
- maxlength of 255 characters
- unique table names across worksheet
2022-04-03 18:23:13 +05:30
aswinkumar863 0e3dbb7e03
Merge branch 'PHPOffice:master' into Table-for-Xlsx 2022-04-03 18:06:24 +05:30
dependabot[bot] 28bb2cd7c7
Bump phpunit/phpunit from 9.5.16 to 9.5.20 (#2726)
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.5.16 to 9.5.20.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-9.5.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.5.16...9.5.20)

---
updated-dependencies:
- dependency-name: phpunit/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-04-03 05:13:55 -07:00
dependabot[bot] 1ae8ef9651
Bump dompdf/dompdf from 1.2.0 to 1.2.1 (#2721)
Bumps [dompdf/dompdf](https://github.com/dompdf/dompdf) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/dompdf/dompdf/releases)
- [Commits](https://github.com/dompdf/dompdf/compare/v1.2.0...v1.2.1)

---
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-04-03 04:56:17 -07:00
MarkBaker 3ae5a3fae3 Additional unit tests for BColumnAndRow methods, to verify that they still work as expected 2022-04-02 21:37:05 +02:00
MarkBaker 6b4ffda5ae Add functionality to adjust CellRange by "modifying" the from/to CellAddress Value objects 2022-04-01 15:41:55 +02:00
MarkBaker 1849737abc Add functionality to shift RowRange and ColumnRange 2022-04-01 11:26:47 +02:00
MarkBaker 62238bc011 Initial work on deprecating `ByColumnAndRow` methods; and providing functionality to use the basic cellAddress methods to be used with a string cell address (e.g. `C5`); an array of columnId and rowId (e.g. `[3, 5]`) or a new CellAddress object.
Current implementation for all methods that take a single cell reference argument:
 - `setCellValue()`
 - `setCellValueExplicit()`
 - `getCell()`
 - `cellExists()`
 - `setBreak()`
 - `freezePane()`
 - `getComment()`

Also introducing a CellRange object to work with similar cases for methods that accept a cell range rather than simply a cell address; and RowRange/ColumnRange objects for those cases.

Still need to apply to methods that accept a cell range or single cell:
 - `mergeCells()`
 - `unmergeCells()`
 - `protectCells()`
 - `unprotectCells()`
 - `setAutoFilter()`

Then there's a few special cases that accept row and column ranges, not simply cell ranges; or a series of cell ranges.
2022-03-31 23:22:48 +02:00
aswinkumar863 257c22277c
Merge branch 'PHPOffice:master' into Table-for-Xlsx 2022-03-26 17:04:48 +05:30
Mark Baker 8885c4eeef
Merge pull request #2713 from PHPOffice/Filter-return-result-array-indexes
Bugfix to returned column indexes for FILTER() by row
2022-03-24 22:24:39 +01:00