Hi.
Is it possible to do not throw Exception when fixed address is passed to CellsHelper.cellNameToIndex?
At now calling CellsHelper.cellNameToIndex(“$A$2”) throws exception.
Best regards, Alexey
Hi.
Is it possible to do not throw Exception when fixed address is passed to CellsHelper.cellNameToIndex?
At now calling CellsHelper.cellNameToIndex(“$A$2”) throws exception.
Best regards, Alexey
@makarovalv
Sorry, we need to maintain this exception throwing mechanism. “$A$2” is not a correct cell name.
In formula related APIs, you can use it this way. Of course, this can also be used when creating a range.
For example:
Workbook wb = new Workbook(filePath + "sample.xlsx");
Cells cells = wb.getWorksheets().get(0).getCells();
Range r = cells.createRange("$A$2");
@makarovalv
As a public api used by many users and applications, we are afraid changing its behavior for invalid input will affect too many users and their existing applications, even cause unexpected results for them.
For you situation, we think you may remove those special characters before applying them to this api. Or, you may use other apis such as Cells.CreateRange() instead of CellNameToIndex. Thank you for your understanding.