rmannibucau commented on PR #1271:
URL: https://github.com/apache/poi/pull/1271#issuecomment-5721624686
Ack, this is now handled by aa3c6a12 + 474aac4b: input names go through
`requireValidName` (rules based on `XSSFName.validateName`: max 255 chars,
first char letter/underscore/backslash, no digits or invalid characters; plus
rejection of the `R`/`C` R1C1 shorthand and the `TRUE`/`FALSE` literals which
the formula parser would otherwise swallow as booleans) and then
`requireReferenceFreeName`, which rejects any name that
`CellReference.classifyCellReference(name, version)` classifies as a cell
reference for the active `SpreadsheetVersion`. So `setCellValue("Q1", ...)` now
fails fast with an `IllegalArgumentException` instead of silently resolving to
the virtual cell.
Bare letters like `x` stay accepted on purpose: `NameType.COLUMN` names are
legal Excel defined names - only `R` and `C` are reserved as R1C1 shorthand,
and those are already rejected by `requireValidName` - and rejecting them would
exclude names Excel itself accepts (consistent with the `XSSFName.validateName`
policy). This rationale is documented in the javadoc of
`requireReferenceFreeName`. If you prefer a stricter deny-list there, happy to
discuss it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]