Named Cell is a degenerate case of "Named Range" (I think)
In which case, following should help you:
HSSFName namedcell = HSSFWorkbook.getNameIndex("XXX");
CellReference cref = new CellReference(namedcell.getReference());
HSSFCell cell = sheet.getRowAt(cref.getRow()).getCellAt(cref.getCol());
(I havent checked the code for compile errors etc, but you get the idea)
Regards,
~ amol
> -----Original Message-----
> From: Quan Nguyen Hai [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 11, 2005 11:33 AM
> To: [email protected]
> Subject: cell with defined name
>
>
> Hi all,
>
> I have a problem when I tried to read the Excel file that has
> a cell defined with a name. Normally, in the excel file, a
> cell is defined by the row and the column number, for example
> a cell at C1 or A3. When I changed the name of C1 cell to
> XXX, I don't know how to read the name XXX. Is there any
> function in HSSF which can read this "variable" ?
>
> Thank you.
>
>
>
> Regards.
>
> Quan
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/