|Summary:||[PATCH] Make CellReference and AreaReference sheetName aware|
|Component:||HSSF||Assignee:||POI Developers List <dev>|
|Attachments:||Adds sheetname awareness|
Description brett.knights 2003-05-13 13:13:10 UTC
for v 1.11 HEAD This patch contains two related fixes. The first is to allow CellReference and AreaReference constructors to recognize a reference containing a sheet name. This allows CellReference to be used with the reference returned by e.g. HSSFName orderRefName = wb.getNameAt(wb.getNameIndex("OrderReference")); CellReference cellRef = new CellReference(orderRefName.getReference()); HSSFCell orderNameCell = wb.getSheet(cellRef.getSheetName()).getRow ((short)cellRef.getRow()).getCell((short)cellRef.getCol()); This wasn't absolutely necessary since HSSFName has a getSheetName method but it makes cell reference more useful in the general case. (though CellReference will probably need a workbook reference as well for properly modeling formulae) The second makes AreaReference return an array if it was passed a simple cell reference. This fixes a bug reported on the mailing list in April.
Comment 1 brett.knights 2003-05-13 13:14:22 UTC
Created attachment 6347 [details] Adds sheetname awareness
Comment 2 Danny Mui 2003-05-17 17:57:04 UTC
committed 05/17/2003, please verify. Thanks for your contribution!