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[1] if it was passed a simple cell reference. This fixes a bug reported on the mailing list in April.
Created attachment 6347 [details] Adds sheetname awareness
committed 05/17/2003, please verify. Thanks for your contribution!