Skip to content

Conversation

MarkBaker
Copy link
Member

@MarkBaker MarkBaker commented Mar 31, 2022

PR for Issue #2717

Initial work on deprecating ByColumnAndRow methods in Worksheet; 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.

Current implementation for all methods that take a cell range reference argument; noting that protected cells or style can be individual cells or a range:

  • mergeCells()
  • unmergeCells()
  • protectCells()
  • unprotectCells()
  • setAutoFilter()
  • getStyle()

Then there's a few special cases like setSelectedCells() still to complete.

It's also worth noting that I've tightened up validation a bit; and also want to make some further modifications to better support passing a Named Range to these methods.

This is:

- [ ] a bugfix
- [ ] a new feature
- [X] deprecation

Checklist:

Why this change is needed?

Deprecation to simplify the Worksheet object and provide more consistency in methods

@MarkBaker MarkBaker force-pushed the CellAddress-object branch 3 times, most recently from 895f63d to 27a8320 Compare March 31, 2022 20:48
…unctionality 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.
@MarkBaker MarkBaker force-pushed the CellAddress-object branch from 27a8320 to 62238bc Compare March 31, 2022 21:23
@MarkBaker MarkBaker force-pushed the CellAddress-object branch 3 times, most recently from 2864afb to 9b25ed4 Compare April 1, 2022 13:21
@MarkBaker MarkBaker force-pushed the CellAddress-object branch 4 times, most recently from 6b26544 to 64fec4d Compare April 2, 2022 15:26
@MarkBaker MarkBaker force-pushed the CellAddress-object branch 3 times, most recently from 92d03a6 to 9ca5768 Compare April 5, 2022 18:28
@MarkBaker MarkBaker force-pushed the CellAddress-object branch from 9ca5768 to 83aaf32 Compare April 6, 2022 18:37
@oleibman oleibman mentioned this pull request Apr 7, 2022
@MarkBaker MarkBaker merged commit a6cb80f into master Apr 12, 2022
@MarkBaker MarkBaker deleted the CellAddress-object branch April 12, 2022 06:48
@MarkBaker MarkBaker added this to the 2.0 milestone Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant