Bug 19888 - [PATCH] Make CellReference and AreaReference sheetName aware
Summary: [PATCH] Make CellReference and AreaReference sheetName aware
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: unspecified
Hardware: All other
: P3 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2003-05-13 13:13 UTC by brett.knights
Modified: 2004-11-16 19:05 UTC (History)
0 users

Adds sheetname awareness (6.11 KB, patch)
2003-05-13 13:14 UTC, brett.knights
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 


        HSSFName orderRefName = wb.getNameAt(wb.getNameIndex("OrderReference"));
        CellReference cellRef = new CellReference(orderRefName.getReference());
        HSSFCell orderNameCell = wb.getSheet(cellRef.getSheetName()).getRow

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.
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!