Skip to content

Add support for all columns in getCellMark#568

Merged
rzymek merged 1 commit intodhatim:masterfrom
sz-blacky:master
Dec 4, 2025
Merged

Add support for all columns in getCellMark#568
rzymek merged 1 commit intodhatim:masterfrom
sz-blacky:master

Conversation

@sz-blacky
Copy link
Contributor

Fix for issue #567

This change makes the getCellMark method return the correct column strings for two- and three-letter columns as well and adds a POI test case that fails with the previous implementation but succeeds with the proposed one.

@krisztiankocsis
Copy link

We use it extensively and the PR was created to fix the issue we face very often.
Pls try to create a new bugfix release that contains this fix.

char columnLetter = (char) ('A' + coll);
return String.valueOf(columnLetter) + String.valueOf(row+1);
static String getCellMark(int row, int coll) {
if (0 <= coll && coll <= 'Z' - 'A') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use colToString always here? Perhaps make colToString static, so there's no need for the REF_HELPER

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also there's CellAdress.toString

@rzymek rzymek merged commit 2b3b57c into dhatim:master Dec 4, 2025
1 check passed
@rzymek
Copy link
Collaborator

rzymek commented Dec 4, 2025

Consolidated col-index-to-string logic in 25ecdff
Merged the test from this branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants