Bug 33153 - Need way to get cell num in excel form eg. C11, GH239 etc.
Summary: Need way to get cell num in excel form eg. C11, GH239 etc.
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.5-FINAL
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2005-01-18 17:09 UTC by Amol Deshmukh
Modified: 2005-01-28 10:08 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Amol Deshmukh 2005-01-18 17:09:25 UTC
Currently, in HSSF, there appears to be no way to get the cell number in excel
format (eg. C11, GH239 etc.) that would be useful in generating formulas when
dynamically creating excel sheets.

For this, HSSFCell class seems to be the most natural place to put a method like:
          public String getCellRefString() {...}
that would return a String of the form: AD11 or whatever is appropriate.
(Basically convert the cellNum to base 26 (A-Z) and append the row num)
Comment 1 Avik Sengupta 2005-01-28 19:08:43 UTC
new org.apache.poi.hssf.util.CellReference(row,col).toString()