com.extentech.ExtenXLS
Class SimpleCellValue

java.lang.Object
  extended by com.extentech.ExtenXLS.SimpleCellValue
All Implemented Interfaces:
Cell

public class SimpleCellValue
extends java.lang.Object
implements Cell

a simple implementation of Cell for use in

Author:
john :: Dec 15, 2010 :: Copyright ©2011Extentech Inc.

Field Summary
 
Fields inherited from interface com.extentech.ExtenXLS.Cell
TYPE_BLANK, TYPE_BOOLEAN, TYPE_DOUBLE, TYPE_FORMULA, TYPE_FP, TYPE_INT, TYPE_STRING
 
Constructor Summary
SimpleCellValue(java.lang.Object v, java.lang.String f, java.lang.String ca, java.lang.String s, int r, int c, int fi, boolean isdate)
          default constructor which takes in all the values Dec 15, 2010
 
Method Summary
 void fireParserEvent()
          this method will be fired as each record is parsed from an input Spreadsheet Dec 15, 2010
 java.lang.String getCellAddress()
          Returns the Address of this Cell as a String.
 int getCellType()
           
 int getColNum()
          Returns the column number of this Cell.
 FormatHandle getFormatHandle()
           
 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()
          Gets the value of the cell as a String with the number format applied.
 java.lang.String getFormattedStringValue()
           
 int getRowNum()
          This is the 1-based row number such as you will see in a spreadsheet UI.
 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()
           
 void setFormatHandle(FormatHandle formatHandle)
           
 java.lang.String toString()
          Returns a String representation of this CellHandle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleCellValue

public SimpleCellValue(java.lang.Object v,
                       java.lang.String f,
                       java.lang.String ca,
                       java.lang.String s,
                       int r,
                       int c,
                       int fi,
                       boolean isdate)
default constructor which takes in all the values Dec 15, 2010

Parameters:
val -
formattedVal -
celladdress -
sheetname -
rownum -
colnum -
formatid -
Method Detail

getFormatHandle

public FormatHandle getFormatHandle()
Returns:
Returns the formatHandle.

setFormatHandle

public void setFormatHandle(FormatHandle formatHandle)
Parameters:
formatHandle - The formatHandle to set.

fireParserEvent

public void fireParserEvent()
this method will be fired as each record is parsed from an input Spreadsheet Dec 15, 2010


getCellAddress

public java.lang.String getCellAddress()
Description copied from interface: Cell
Returns the Address of this Cell as a String.

Specified by:
getCellAddress in interface Cell
Returns:
String the address of this Cell in the WorkSheet
See Also:
Cell.getCellAddress()

getColNum

public int getColNum()
Description copied from interface: Cell
Returns the column number of this Cell.

Specified by:
getColNum in interface Cell
Returns:
int the Column Number of the Cell
See Also:
Cell.getColNum()

getFormattedStringValue

public java.lang.String getFormattedStringValue()
See Also:
Cell.getFormattedStringVal()

getRowNum

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

Specified by:
getRowNum in interface Cell
Returns:
int the ONE-based Row Number of the Cell
See Also:
Cell.getRowNum()

getVal

public java.lang.Object getVal()
Description copied from interface: Cell
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.

Specified by:
getVal in interface Cell
Returns:
Object value for this Cell
See Also:
Cell.getVal()

getWorkSheetName

public java.lang.String getWorkSheetName()
Description copied from interface: Cell
Returns the name of this Cell's WorkSheet as a String.

Specified by:
getWorkSheetName in interface Cell
Returns:
String the name this Cell's WorkSheet
See Also:
Cell.getWorkSheetName()

getFormatId

public int getFormatId()
Description copied from interface: Cell
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)

Specified by:
getFormatId in interface Cell
Returns:
int the FormatId for this Cell
See Also:
Cell.getFormatId()

toString

public java.lang.String toString()
Returns a String representation of this CellHandle

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

getCellType

public int getCellType()
Specified by:
getCellType in interface Cell
See Also:
Cell.getCellType()

isDate

public boolean isDate()
Specified by:
isDate in interface Cell
See Also:
Cell.isDate()

getFormattedStringVal

public java.lang.String getFormattedStringVal()
Gets the value of the cell as a String with the number format applied. Boolean cell types will return "true" or "false". Custom number formats are not currently supported, although they will be written correctly to the output file. Patterns that display negative numbers in red are not currently supported; the number will be prefixed with a minus sign instead. For more information on number format patterns see Microsoft KB264372.

Specified by:
getFormattedStringVal in interface Cell
Returns:
the value of the cell as a string formatted according to the cell type and, if present, the number format pattern


Copyright © 2011 Extentech Inc. All Rights Reserved.