Replies: 7 comments 1 reply
-
I haven't found an option for a poll here on github discussions, but I am running a poll on twitter |
Beta Was this translation helpful? Give feedback.
-
So for deprecating And the options to modify In turn, a new CellAddress object could be created with static constructors like |
Beta Was this translation helpful? Give feedback.
-
And while I've been thinking through the possibilities of a CellAddress object over the last few days, there's also potential for new CellRange(new CellAddress('C3'), new CellAddress('E5')) to provide cell range |
Beta Was this translation helpful? Give feedback.
-
I've just come across this - is the removal of setCellValueByColumnAndRow definitely going ahead? If so, is there a way to mark it in the documentation so that developers are aware and don't add new code using it that will break when they upgrade? (I'm happy to make a PR for the docs, but I don't know if there is a standard way of marking functions as to be removed). At the moment there's no indication that the functionality is going to be removed, e.g. on: |
Beta Was this translation helpful? Give feedback.
-
@pwaring The functions in question all have |
Beta Was this translation helpful? Give feedback.
-
Since v2 has been released this topic can probably be closed |
Beta Was this translation helpful? Give feedback.
-
I'm planning version 2.0 with some bc breaks, and I'm looking at dropping methods like
setCellValueByColumnAndRow()
which accepts column and row number arguments, leaving onlysetCellValue()
which requires a cell address as a string value(e.g. 'C5').There are 14 such methods defined in the
WorkSheet
class:setCellValueByColumnAndRow()
has equivalentsetCellValue()
setCellValueExplicitByColumnAndRow()
has equivalentsetCellValueExplicit()
getCellByColumnAndRow()
has equivalentgetCell()
cellExistsByColumnAndRow()
has equivalentcellExists()
getStyleByColumnAndRow()
has equivalentgetStyle()
setBreakByColumnAndRow()
has equivalentsetBreak()
mergeCellsByColumnAndRow()
has equivalentmergeCells()
unmergeCellsByColumnAndRow()
has equivalentunmergeCells()
protectCellsByColumnAndRow()
has equivalentprotectCells()
unprotectCellsByColumnAndRow()
has equivalentunprotectCells()
setAutoFilterByColumnAndRow()
has equivalentsetAutoFilter()
freezePaneByColumnAndRow()
has equivalentfreezePane()
getCommentByColumnAndRow()
has equivalentgetComment()
setSelectedCellByColumnAndRow()
has equivalentsetSelectedCells()
and other methods that only accept a cell address like
IV255
.There are also one column-only method:
getColumnDimensionByColumn()
has equivalentgetColumnDimension()
Should I just drop those methods?
Or should I modify
setCellValue()
(and the equivalent methods for all the above) to accept either a string cell value (C5) or an array [3,5]Or even introduce a new CellAddress object?
or
An array is less structured: should it be row first, or column first? Should
[3,5]
refer to cellC5
or cellE3
?A
CellAddress
object could be defined with static creator methods likefromRowAndColumn($rowIndex, $columnIndex)
,fromColumnAndRow($columnIndex, $rowIndex)
,fromCoordinate($cellAddress)
, etc; and providegetters
to retrieve rowIndex, columnIndex, columnString, cellAddress, etc, giving it a lot more flexibility.Beta Was this translation helpful? Give feedback.
All reactions