On 2/28/2017 9:54 AM, Englander, Douglas wrote:
Thank you Steve. Do you know if there is a document anywhere that lists all of the possible values that SSCell_getCellType could return?
The Javadoc is the place for this.
http://poi.apache.org/apidocs/index.html
How to get to the right place in the documentation is actually easy, but
I usually have to wind my way back to the beginning in the RPG...
Let's peep at the definition of SSCell_getCellType:
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++
* SSCell_getCellType(): Determine the type of data in an
* SSCell object.
*
* returns an integer that corresponds to a CELL_TYPE_xxx
* constant.
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++
D SSCell_getCellType...
D PR like(jInt)
D ExtProc(*JAVA
D : CELL_CLASS
D : 'getCellType')
D HSSFCell_getCellType...
D PR like(jInt)
D ExtProc(*JAVA
D : HSSF_CELL_CLASS
D : 'getCellType')
We can see that getCellType is a method of a class called CELL_CLASS.
CELL_CLASS comes from HSSF_H:
D CELL_CLASS...
D C 'org.apache.poi.ss.usermodel-
D .Cell'
D HSSF_CELL_CLASS...
D C 'org.apache.poi.hssf.usermodel-
D .HSSFCell'
Now we can see that CELL_CLASS is org.apache.poi.ss.usermodel.Cell so
it's off to the Javadoc to see what Cell can do. There are a lot of
classes in the nav bar, but we can scroll to Cell easily enough. If we
wanted to make our lives easier, we could subset the class list by
selecting the package in the upper nav bar. It's
org.apache.poi.ss.usermodel
Anyway, once we get to Cell and click on it, there's a list of methods
in the Method Summary. We know that we want getCellType, so let's look
there. We can see that getCellType returns an int, and by clicking on
it, we see that it currently returns a number, but will be transitioning
to an enum. Assuming (ha!) that we're still on POI 3.15 or less, that
list of numbers is actually at the top in the Field Summary. We have to
click on one to find the value they actually represent.
We RPG programmers can find that same list as RPG constants in HSSF_H.
As an Amazon Associate we earn from qualifying purchases.