com.extentech.ExtenXLS
Interface Cell

All Known Implementing Classes:
CellHandle, SimpleCellValue

public interface Cell

A lightweight subset of Cell methods allowing for low memory overhead streaming implementations Feature Request: methods determining the type of the cell on the new Cell class (like CellHandle.isDate() or getCellType()). The current API has a method returning Object, but from I remember at least the date should be explicitly checked with isDate() method. Basically the API should allow us to do what we do now in method ExcelExtenReader.getCellData(CellHandle). Please review the method and let me know what are the plans for the future.


Field Summary
static int TYPE_BLANK
          Cell types
static int TYPE_BOOLEAN
           
static int TYPE_DOUBLE
           
static int TYPE_FORMULA
           
static int TYPE_FP
           
static int TYPE_INT
           
static int TYPE_STRING
           
 
Method Summary
 java.lang.String getCellAddress()
          Returns the Address of this Cell as a String.
 int getCellType()
           
 int getColNum()
          Returns the column number of this Cell.
 int getFormatId()
          Returns the Formatting record ID (FormatId) for this Cell
This can be used with 'setFormatId(int i)' to copy the formatting from one Cell to another (e.g.
 java.lang.String getFormattedStringVal()
          Returns the value of the Cell as a String with formatting pattern applied..
 int getRowNum()
          Returns the row number of this Cell.
 java.lang.Object getVal()
          Returns the value of this Cell in the native underlying data type.
 java.lang.String getWorkSheetName()
          Returns the name of this Cell's WorkSheet as a String.
 boolean isDate()
           
 

Field Detail

TYPE_BLANK

static final int TYPE_BLANK
Cell types

See Also:
Constant Field Values

TYPE_STRING

static final int TYPE_STRING
See Also:
Constant Field Values

TYPE_FP

static final int TYPE_FP
See Also:
Constant Field Values

TYPE_INT

static final int TYPE_INT
See Also:
Constant Field Values

TYPE_FORMULA

static final int TYPE_FORMULA
See Also:
Constant Field Values

TYPE_BOOLEAN

static final int TYPE_BOOLEAN
See Also:
Constant Field Values

TYPE_DOUBLE

static final int TYPE_DOUBLE
See Also:
Constant Field Values
Method Detail

isDate

boolean isDate()

getCellType

int getCellType()

getFormatId

int getFormatId()
Returns the Formatting record ID (FormatId) for this Cell
This can be used with 'setFormatId(int i)' to copy the formatting from one Cell to another (e.g. a template cell to a new cell)

Returns:
int the FormatId for this Cell

getVal

java.lang.Object getVal()
Returns the value of this Cell in the native underlying data type. Formula cells will return the calculated value of the formula in the calculated data type. Use 'getStringVal()' to return a String regardless of underlying value type.

Returns:
Object value for this Cell

getFormattedStringVal

java.lang.String getFormattedStringVal()
Returns the value of the Cell as a String with formatting pattern applied..
see: http://java.sun.com/docs/books/tutorial/i18n/format/decimalFormat.html
boolean Cell types will return "true" or "false"
Negative numbers that are formatted in excel to show as red values rather than using a "-" will return with a minus symbol.

Returns:
String the formatted value of the Cell

getColNum

int getColNum()
Returns the column number of this Cell.

Returns:
int the Column Number of the Cell

getRowNum

int getRowNum()
Returns the row number of this Cell. NOTE: This is the 1-based row number such as you will see in a spreadsheet UI. ie: A1 = row 1

Returns:
int the ONE-based Row Number of the Cell

getCellAddress

java.lang.String getCellAddress()
Returns the Address of this Cell as a String.

Returns:
String the address of this Cell in the WorkSheet

getWorkSheetName

java.lang.String getWorkSheetName()
Returns the name of this Cell's WorkSheet as a String.

Returns:
String the name this Cell's WorkSheet


Copyright © 2011 Extentech Inc. All Rights Reserved.