|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.extentech.ExtenXLS.CellHandle
public class CellHandle
The CellHandle provides a handle to an XLS Cell and its values.
Use the CellHandle to work with individual Cells in an XLS file.
To instantiate a CellHandle, you must first have a valid WorkSheetHandle,
which in turn requires a valid WorkBookHandle.
for example:
WorkBookHandle book = newWorkBookHandle("testxls.xls");With a CellHandle you can:
WorkSheetHandle sheet1 = book.getWorkSheet("Sheet1");
CellHandlecell = sheet1.getCell("B22");
WorkBookHandle,
WorkSheetHandle,
FormulaHandle,
CellNotFoundException,
CellTypeMismatchException,
Serialized Form| Field Summary | |
|---|---|
int |
COLUMN
|
static int |
NOTATION_SCIENTIFIC
|
static int |
NOTATION_SCIENTIFIC_EXCEL
|
static int |
NOTATION_STANDARD
|
int |
ROW
|
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
|
| Constructor Summary | |
|---|---|
CellHandle(com.extentech.formats.XLS.BiffRec c)
Public Constructor added for use in Bean-context ONLY. |
|
CellHandle(com.extentech.formats.XLS.BiffRec c,
WorkBook myb)
Public Constructor added for use in Bean-context ONLY. |
|
| Method Summary | |
|---|---|
void |
addConditionalFormat(ConditionalFormatHandle format)
Set a conditional format upon this cell. |
List |
calculateAffectedCells()
Calculates and returns all formulas that reference this CellHandle. |
List |
calculateAffectedCellsOnSheet()
Calculates and returns all formulas on the same sheet that reference this CellHandle. |
void |
clear()
Resets this cell to the default, as if it had just been added. |
void |
clearContents()
Resets this cells contents to blank. |
void |
clearFormats()
Resets this cell's format to the default. |
void |
combine(int[] x,
int[] y)
unimplemented - do not use |
int |
compareTo(Object ob)
compare this Cell (via it's string value i.e. |
static CellHandle |
copyCellToWorkSheet(CellHandle sourcecell,
WorkSheetHandle newsheet)
Create a copy of this Cell in another WorkBook |
static CellHandle |
copyCellToWorkSheet(CellHandle sourcecell,
WorkSheetHandle newsheet,
int row,
int col)
Creates a copy of this cell on the given worksheet at the given address. |
static CellHandle |
copyCellToWorkSheet(CellHandle sourcecell,
WorkSheetHandle newsheet,
int row,
int col,
boolean copyByValue)
Creates a copy of this cell on the given worksheet at the given address. |
void |
copyFormat(CellHandle source)
Copy all formats from a source Cell to this Cell |
CellHandle |
copyTo(String newaddr)
copy this Cell to another location. |
CommentHandle |
createComment(String comment,
String author)
Creates a new annotation (Note or Comment) to the cell |
boolean |
equals(Object ob)
compare this Cells equality (via it's string value i.e. |
void |
fireParserEvent()
this method will be fired as each record is parsed from an input Spreadsheet Dec 15, 2010 |
Font |
getAwtFont()
convert the ExtenXLS font used by this Cell to java.awt.Font |
Color |
getBackgroundColor()
get the Color of the Cell Background by this Cell and all other cells sharing this FormatId. |
int |
getBackgroundPattern()
get the Background Pattern for this cell |
boolean |
getBooleanVal()
returns the value of this Cell as a boolean If the Cell is not of type Boolean, returns false |
Color[] |
getBorderColors()
returns Border Colors of Cell in: top, left, bottom, right order returns null or a java.awt.Color object for each of 4 sides |
byte[] |
getBytes()
returns the low-level bytes for the underlying BIFF8 record. |
com.extentech.formats.XLS.BiffRec |
getCell()
return the underlying cell record for internal API use only |
String |
getCellAddress()
Returns the Address of this Cell as a String. |
Color |
getCellBackgroundColor()
Return the cell background color i.e. |
int |
getCellRotation()
Get the rotation of this Cell in degrees. |
int |
getCellType()
Returns the type of the Cell as an int TYPE_STRING = 0, TYPE_FP = 1, TYPE_INT = 2, TYPE_FORMULA = 3, TYPE_BOOLEAN = 4, TYPE_DOUBLE = 5; |
String |
getCellTypeName()
returns the java Type string of the Cell One of: "String" "Float" "Integer" "Formula" "Double" |
ColHandle |
getCol()
Returns the ColHandle for the Cell. |
int |
getColNum()
Returns the column number of this Cell. |
CommentHandle |
getComment()
Get a CommentHandle to the note attached to this cell |
ConditionalFormatHandle[] |
getConditionalFormatHandles()
return all the ConditionalFormatHandles for this Cell, if any |
int |
getConditionalFormatId()
get the conditional formatting record ID (FormatId) returns the normal FormatId if the condition(s) in the conditional format have not been met |
FormatHandle[] |
getConditionallyFormattedHandles()
returns an array of FormatHandles for the Cell that have the current conditional format applied to them. |
Object |
getDefaultVal()
Get the default "empty" data value for this CellHandle |
double |
getDoubleVal()
returns the value of this Cell as a double, if possible, or NaN if Cell value cannot be converted to double |
int |
getFillPattern()
get the fill pattern for this cell Same as getBackgroundPattern |
float |
getFloatVal()
returns the value of this Cell as a float, if possible, or NaN if Cell value cannot be converted to float |
com.extentech.formats.XLS.Font |
getFont()
Get the ExtenXLS Font for this Cell, which roughly matches the functionality of the java.awt.Font class. |
Color |
getFontColor()
get the Color of the Font used by this Cell. |
String |
getFontFace()
get the Font face used by this Cell. |
int |
getFontSize()
get the size in points of the Font used by this Cell |
int |
getFontWeight()
get the weight (boldness) of the Font used by this Cell. |
Color |
getForegroundColor()
get the Color of the Cell Foreground of this Cell and all other cells sharing this FormatId. |
FormatHandle |
getFormatHandle()
Gets the FormatHandle (a Format Object describing the formats for this Cell) for 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. |
String |
getFormatPattern()
Gets the number format pattern for this cell, if set. |
String |
getFormattedStringVal()
Gets the value of the cell as a String with the number format applied. |
FormulaHandle |
getFormulaHandle()
Returns the Formula Handle (an Object describing a Formula) for this Cell, if it contains a formula |
int |
getHorizontalAlignment()
Returns an int representing the current horizontal alignment in this Cell. |
int |
getIntVal()
returns the value of this Cell as a int, if possible, or NaN if Cell value cannot be converted to int |
boolean |
getIsUnderlined()
returns whether the Font for this Cell is underlined |
String |
getJSON()
Get the JSON object for this cell. |
CellRange |
getMergedCellRange()
Returns any other Cells merged with this one, or null if this Cell is not a part of a merged range. |
com.extentech.formats.XLS.XLSRecord |
getRecord()
returns the underlying BIFF8 record for the Cell NOTE: the underlying record is not a part of the public API and may change at any time. |
RowHandle |
getRow()
Returns the RowHandle for the Cell. |
int |
getRowNum()
Returns the row number of this Cell. |
int |
getSheetNum()
get the index of the WorkSheet containing this Cell in the list of sheets |
int[] |
getSpan(int row,
int column)
returns the size of the Merged Cell area if this Cell is a part of a Merged Cell area |
String |
getStringVal()
Returns the value of the Cell as a String. |
String |
getStringVal(int notation)
Returns the value of the Cell as a String. |
String |
getStringVal(String encoding)
Returns the value of the Cell as a String with the specified encoding. |
String |
getURL()
Returns the Hyperlink URL String for this Cell, if any |
String |
getURLDescription()
Returns the URL Description String for this Cell, if any |
Object |
getVal()
Returns the value of this Cell in the native underlying data type. |
ValidationHandle |
getValidationHandle()
Returns the validation handle for the cell. |
int |
getVerticalAlignment()
Returns an int representing the current vertical alignment in this Cell. |
WorkBook |
getWorkBook()
returns the WorkBookHandle for this Cell |
WorkSheetHandle |
getWorkSheetHandle()
get the WorkSheetHandle for this Cell |
String |
getWorkSheetName()
Returns the name of this Cell's WorkSheet as a String. |
boolean |
getWrapText()
Get the cell wrapping behavior for this cell. |
String |
getXML()
Returns an XML representation of the cell and it's component data |
String |
getXML(int[] mergedRange)
Returns an XML representation of the cell and it's component data |
boolean |
hasHyperlink()
returns true if this Cell contains a hyperlink |
boolean |
isBlank()
Returns whether this is a blank cell. |
boolean |
isCurrency()
Returns whether this Cell has a Currency format applied. |
boolean |
isDate()
Returns whether this Cell has Date formatting applied. |
boolean |
isDefaultCell()
Determines if the cellHandle represents a completely blank/null cell, and can thus be ignored for many operations. |
boolean |
isFormula()
Returns whether this cell is a formula. |
boolean |
isFormulaHidden()
Returns whether the formula for the Cell is hidden |
boolean |
isLocked()
returns whether this Cell is locked for editing |
boolean |
isMergeParent()
Returns if the Cell is the parent (cell containing display value) of a merged cell range. |
boolean |
isNumber()
Returns whether this Cell has a numeric value |
boolean |
isVisible(int row,
int column)
returns whether this Cell is visible in UI implementations. |
void |
moveTo(String newaddr)
move this cell to another location. |
void |
moveToCol(String newcol)
move this cell to another column throws CellPositionConflictException if there is a cell in that position already |
void |
moveToRow(int newrow)
move this cell to another row throws CellPositionConflictException if there is a cell in that position already |
void |
remove(boolean nullme)
Removes this Cell from the WorkSheet |
void |
removeComment()
Removes any note/comment records attached to this cell |
void |
setBackgroundColor(Color col)
set the Color of the Cell Background pattern for this Cell. |
void |
setBackgroundColor(int t)
set the Background Color for this Cell. |
void |
setBackgroundPattern(int t)
set the Background Pattern for this Cell. |
void |
setBold(boolean bold)
Convenience method for toggling the bold state of the Font used by this Cell. |
void |
setBorderBottomColor(Color col)
set the Color of the bottom Border line for this Cell. |
void |
setBorderColor(Color col)
set the Color of the Border for this Cell. |
void |
setBorderLeftColor(Color col)
set the Color of the left Border line for this Cell. |
void |
setBorderLineStyle(short s)
set the Border line style for this Cell. |
void |
setBorderRightColor(Color col)
set the Color of the right Border line for this Cell. |
void |
setBorderTopColor(Color col)
set the Color of the top Border line for this Cell. |
void |
setBottomBorderLineStyle(short s)
set the Bottom Border line style for this Cell. |
void |
setCellBackgroundColor(Color col)
set the Color of the Cell Background for this Cell. |
void |
setCellBackgroundColor(int t)
set the Color of the Cell Background for this Cell. |
void |
setCellRotation(int align)
Set the rotation of the cell in degrees. |
void |
setFileURL(String fileURLStr)
Sets a hyperlink to a location within the current template The URL String should be prefixed with "file://" |
void |
setFileURL(String fileURLstr,
String desc,
String textMark)
Sets a hyperlink to a location within the current template, and includes additional optional information: description + textMark text The URL String should be prefixed with "file://" The textMark text is the porition of the URL that follows # |
void |
setFont(String fn,
int stl,
int sz)
Set the Font for this Cell via font name, font style and font size This method adds a new Font to the WorkBook. |
void |
setFontColor(Color col)
Set the color of the Font used by this Cell. |
void |
setFontColor(int t)
set the Font Color for this Cell see FormatHandle.COLOR constants for valid values |
void |
setFontFace(String fn)
set the Font face used by this Cell. |
void |
setFontSize(int sz)
change the size (in points) of the Font used by this Cell and all other Cells sharing this FormatId. |
void |
setFontWeight(int wt)
change the weight (boldness) of the Font used by this Cell. |
void |
setForeColor(int i)
set the Foreground Color for this Cell NOTE: this is the PATTERN Color |
void |
setForegroundColor(Color col)
sets the Color of the Cell Foreground pattern for this Cell. |
void |
setForegroundColor(int t)
set the Foreground Color for this Cell. |
void |
setFormatHandle(FormatHandle f)
Sets the FormatHandle (a Format Object describing the formats for this Cell) for this Cell |
void |
setFormatId(int i)
Sets the Formatting record ID (FormatId) for this Cell This can be used with 'getFormatId()' to copy the formatting from one Cell to another (ie: a template cell to a new cell) |
void |
setFormatPattern(String pat)
Sets the number format pattern for this cell. |
void |
setFormula(Stack newExp,
Object value)
sets the formula for this cellhandle using a stack of Ptgs appropriate for formula records. |
void |
setFormula(String formStr)
Set a cell to Excel-compatible formula passed in as String. |
void |
setFormula(String formStr,
Object value)
Set a cell to formula passed in as String. |
void |
setFormulaHidden(boolean hidden)
Hides or shows the formula for this Cell, if present |
void |
setHorizontalAlignment(int align)
Set the horizontal alignment for this Cell |
void |
setLeftBorderLineStyle(short s)
set the Left Border line style for this Cell. |
void |
setLocked(boolean locked)
locks or unlocks this Cell for editing |
void |
setPatternBackgroundColor(Color col)
set the Color of the Cell Background Pattern for this Cell. |
void |
setRecord(com.extentech.formats.XLS.XLSRecord rec)
sets the underlying BIFF8 record for the Cell NOTE: the underlying record is not a part of the public API and may change at any time. |
void |
setRightBorderLineStyle(short s)
set the Right Border line style for this Cell. |
void |
setScript(int ss)
Set the super/sub script for the Font |
void |
setSpan(int[] span,
int row,
int column)
internal UI interface implementation -- do not use |
void |
setStringVal(String s)
set the value of this cell to String s NOTE: this method will not check for formula references or do any data conversions This method is useful when a string may start with = but you do not want to convert to a Formula value If you wish to put a line break in the string use the newline "\n" character. |
void |
setStringVal(com.extentech.formats.XLS.Unicodestring us)
set the value of this cell to Unicodestring us NOTE: This method will not check for formula references or do any data conversions Useful when strings may start with = but you do not want to convert to a formula value |
void |
setToDefault()
Sets a default "empty" value appropriate for the cell type of this CellHandle For example, will set the value to 0.0 for TYPE_DOUBLE, an empty String for TYPE_BLANK |
void |
setTopBorderLineStyle(short s)
set the Top Border line style for this Cell. |
void |
setUnderlined(boolean isUnderlined)
Set whether the Font for this Cell is underlined |
void |
setURL(String urlstr)
Creates a new Hyperlink for this Cell from a URL String. |
void |
setURL(String urlstr,
String desc,
String textMark)
Creates a new Hyperlink for this Cell from a URL String, a descrpiton and textMark text. |
void |
setVal(boolean b)
Sets the value of this Cell to a boolean value |
void |
setVal(Date dt,
String fmt)
Sets the value of this Cell to a java.sql.Date. |
void |
setVal(double d)
Set the Value of the Cell to a double |
void |
setVal(float f)
Set value of this Cell to a Float |
void |
setVal(int i)
Set the value of this Cell to an int value NOTE: setting a Boolean Cell type to a zero or a negative number will set the Cell to 'false'; setting it to an int value 1 or greater will set it to true. |
void |
setVal(Object obj)
Set the val of this Cell to an object The object may be one of type: String, Float, Integer, Double, Long, Boolean, java.sql.Date, or null To set a Cell to a formula, obj should be a string begining with "=" To set a Cell to an array formula, obj should be a string begining with "{=" If you wish to put a line break in a string value, use the newline "\n" character. |
void |
setVerticalAlignment(int align)
Set the Vertical alignment for this Cell |
void |
setWorkSheetHandle(WorkSheetHandle handle)
set the WorkSheetHandle for this Cell |
void |
setWrapText(boolean wrapit)
Sets the cell wrapping behavior for this cell |
void |
split(int row,
int column)
internal UI interface implementation -- do not use |
String |
toString()
Returns a String representation of this CellHandle |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_BLANK
public static final int TYPE_STRING
public static final int TYPE_FP
public static final int TYPE_INT
public static final int TYPE_FORMULA
public static final int TYPE_BOOLEAN
public static final int TYPE_DOUBLE
public static final int NOTATION_STANDARD
public static final int NOTATION_SCIENTIFIC
public static final int NOTATION_SCIENTIFIC_EXCEL
public final int ROW
public final int COLUMN
| Constructor Detail |
|---|
public CellHandle(com.extentech.formats.XLS.BiffRec c)
public CellHandle(com.extentech.formats.XLS.BiffRec c,
WorkBook myb)
| Method Detail |
|---|
public com.extentech.formats.XLS.XLSRecord getRecord()
public void setRecord(com.extentech.formats.XLS.XLSRecord rec)
XLSRecord - rec - The BIFF record to set.public void setToDefault()
public Object getDefaultVal()
public void setFormatPattern(String pat)
getFormattedStringVal() method)
but they will be written correctly to the output file. For more
information on number format patterns see
Microsoft KB264372.
pat - the Excel number format pattern to applyFormatConstantsImpl.getBuiltinFormats()public String getFormatPattern()
null if none is appliedpublic boolean isDate()
isDate in interface Cellpublic boolean isFormula()
public boolean isFormulaHidden()
public boolean isLocked()
public boolean isBlank()
public boolean isCurrency()
public boolean isNumber()
public void setFontSize(int sz)
int - sz - Font size in Points.public void setFontWeight(int wt)
int - wt - Font weight range between 100-1000public void setBold(boolean bold)
boolean - bold - true if boldpublic int getFontWeight()
public int getFontSize()
public Color getFontColor()
constantspublic void setFontColor(Color col)
java.Awt.Color - col - color of the fontpublic void setForegroundColor(int t)
int - t - Excel color constantconstantspublic void setForeColor(int i)
int - Excel color constantconstantspublic void setBackgroundColor(int t)
int - t - Excel color constantconstantspublic Color getForegroundColor()
public void setForegroundColor(Color col)
java.awt.Color - col - color for the foregroundpublic Color getBackgroundColor()
public Color getCellBackgroundColor()
public void setBackgroundColor(Color col)
java.awt.Color - col - background colorpublic void setCellBackgroundColor(int t)
int - t - Excel color constant for Cell Background colorpublic void setCellBackgroundColor(Color col)
java.awt.Color - col - color of the cell backgroundpublic void setPatternBackgroundColor(Color col)
java.awt.Color - col - color of the pattern backgroundpublic void setBackgroundPattern(int t)
int - t - Excel pattern constantconstantspublic int getBackgroundPattern()
constantspublic int getFillPattern()
constantspublic void setBorderColor(Color col)
java.awt.Color - col - border colorpublic void setBorderRightColor(Color col)
java.awt.Color - col - right border colorpublic void setBorderLeftColor(Color col)
java.awt.Color - col - left border colorpublic void setBorderTopColor(Color col)
java.awt.Color - col - top border colorpublic void setBorderBottomColor(Color col)
java.awt.Color - col - bottom border colorpublic String getFontFace()
public void setFontFace(String fn)
String - fn - system name of the fontpublic void setBorderLineStyle(short s)
short - s - border constantline style constantspublic void setRightBorderLineStyle(short s)
short - s - border constantline style constantspublic void setLeftBorderLineStyle(short s)
short - s - border constantline style constantspublic void setTopBorderLineStyle(short s)
short - s - border constantline style constantspublic void setBottomBorderLineStyle(short s)
short - s - border constantline style constantspublic com.extentech.formats.XLS.Font getFont()
public Font getAwtFont()
public void setFont(String fn,
int stl,
int sz)
String - fn - system name of the font e.g. "Arial"int - stl - font style (either Font.BOLD or Font.PLAIN)int - sz - font size in points
public CommentHandle getComment()
throws DocumentObjectNotFoundException
DocumentObjectNotFoundExceptionpublic void removeComment()
public CommentHandle createComment(String comment,
String author)
comment - -- text of noteauthor - -- name of author
CommentHandlepublic boolean getIsUnderlined()
public void setUnderlined(boolean isUnderlined)
boolean - b - true if the Font for this Cell should be underlined (single underline only)public void setFontColor(int t)
int - t - Excel color constantpublic CellRange getMergedCellRange()
public boolean isMergeParent()
public ColHandle getCol()
public RowHandle getRow()
public Object getVal()
getVal in interface Cellpublic String getCellTypeName()
public int getCellType()
getCellType in interface Cellpublic com.extentech.formats.XLS.BiffRec getCell()
public Color[] getBorderColors()
public byte[] getBytes()
public int getColNum()
getColNum in interface Cellpublic int getRowNum()
getRowNum in interface Cellpublic String getCellAddress()
getCellAddress in interface Cellpublic String getWorkSheetName()
getWorkSheetName in interface Cellpublic String getStringVal()
public String getFormattedStringVal()
getFormattedStringVal in interface Cellpublic String getStringVal(int notation)
int - notation one of the CellHandle.NOTATION constants for numeric cell types;
ignored for other cell typesint - notation - notation constant
public String getStringVal(String encoding)
String - encoding
public int getFormatId()
getFormatId in interface Cellpublic int getConditionalFormatId()
public void moveToRow(int newrow)
throws com.extentech.formats.XLS.CellPositionConflictException
int - newrow - new row number
com.extentech.formats.XLS.CellPositionConflictException
public void moveToCol(String newcol)
throws com.extentech.formats.XLS.CellPositionConflictException
String - newcol - the new column in alpha format e.g. "A", "B" ...
com.extentech.formats.XLS.CellPositionConflictExceptionpublic void copyFormat(CellHandle source)
CellHandle - source - source cell
public CellHandle copyTo(String newaddr)
throws com.extentech.formats.XLS.CellPositionConflictException
String - newaddr - address for copy of this Cell in Excel-style e.g. "A1"
com.extentech.formats.XLS.CellPositionConflictException - if there is a cell in the new address alreadypublic void remove(boolean nullme)
boolean - nullme - true if this CellHandle should be nullified after removal
public void moveTo(String newaddr)
throws com.extentech.formats.XLS.CellPositionConflictException
String - newaddr - the new address for Cell in Excel-style notation e.g. "A1"
com.extentech.formats.XLS.CellPositionConflictException - if there is a cell in the new address alreadypublic void addConditionalFormat(ConditionalFormatHandle format)
format - A ConditionalFormatHandle in the same worksheetpublic FormatHandle[] getConditionallyFormattedHandles()
public ConditionalFormatHandle[] getConditionalFormatHandles()
public FormatHandle getFormatHandle()
public void setLocked(boolean locked)
boolean - locked - true if Cell should be locked, false otherwisepublic void setFormulaHidden(boolean hidden)
boolean - hidden - setting whether to hide or show formulas for this Cellpublic void setFormatHandle(FormatHandle f)
FormatHandle - to apply to this CellFormatHandlepublic void setFormatId(int i)
int - i - the new index to the Format for this Cellpublic void clearFormats()
public void clearContents()
public void clear()
public FormulaHandle getFormulaHandle()
throws com.extentech.formats.XLS.FormulaNotFoundException
com.extentech.formats.XLS.FormulaNotFoundExceptionFormulaHandlepublic String getURL()
public String getURLDescription()
public boolean hasHyperlink()
public void setURL(String urlstr)
String - urlstr - the URL String for this Cell
public void setURL(String urlstr,
String desc,
String textMark)
String - urlstr - the URL StringString - desc - the description textString - textMark - the text that follows #public void setFileURL(String fileURLStr)
String - fileURLStr - the file URL String
public void setFileURL(String fileURLstr,
String desc,
String textMark)
String - fileURLstr - the file URL StringString - desc - the description textString - textMark - text that follows #
public void setVal(Object obj)
throws com.extentech.formats.XLS.CellTypeMismatchException
Object - obj - the object to set the value of the Cell to
com.extentech.formats.XLS.CellTypeMismatchExceptionpublic void setStringVal(String s)
String - s - the String value to set the Cell to
com.extentech.formats.XLS.CellTypeMismatchExceptionsetVal(Object obj)public void setStringVal(com.extentech.formats.XLS.Unicodestring us)
Unicodestring - us - Unicode String
com.extentech.formats.XLS.CellTypeMismatchExceptionpublic void fireParserEvent()
public String toString()
toString in class ObjectObject.toString()
public void setVal(double d)
throws com.extentech.formats.XLS.CellTypeMismatchException
double - d- double value to set this Cell to
com.extentech.formats.XLS.CellTypeMismatchException
public void setVal(float f)
throws com.extentech.formats.XLS.CellTypeMismatchException
float - f - float value to set this Cell to
com.extentech.formats.XLS.CellTypeMismatchException
public void setVal(Date dt,
String fmt)
java.sql.Date - dt - the value of the new CellString - fmt - date formatting pattern
public void setVal(boolean b)
throws com.extentech.formats.XLS.CellTypeMismatchException
boolean - b - boolean value to set this Cell to
com.extentech.formats.XLS.CellTypeMismatchException
public void setVal(int i)
throws com.extentech.formats.XLS.CellTypeMismatchException
int - i - int value to set this Cell to
com.extentech.formats.XLS.CellTypeMismatchExceptionpublic double getDoubleVal()
public int getIntVal()
public float getFloatVal()
public boolean getBooleanVal()
public void setFormula(String formStr)
throws com.extentech.formats.XLS.FunctionNotSupportedException
String - formStr - the Formula String
com.extentech.formats.XLS.FunctionNotSupportedException - if unable to parse string correctly
public void setFormula(String formStr,
Object value)
throws Exception
String - formulaStr - The excel-compatible formula string to pass inObject - value - The calculated value of the formula
Exception - if unable to parse string correctly
public void setFormula(Stack newExp,
Object value)
Stack - newExp - Stack of PtgsObject - value - calculated value of formula
public int[] getSpan(int row,
int column)
getSpan in interface com.extentech.swingtools.table.CellSpanint - row -int - column -
public void setSpan(int[] span,
int row,
int column)
setSpan in interface com.extentech.swingtools.table.CellSpan
public boolean isVisible(int row,
int column)
isVisible in interface com.extentech.swingtools.table.CellSpanint - row -int - column -
public void combine(int[] x,
int[] y)
combine in interface com.extentech.swingtools.table.CellSpan
public void split(int row,
int column)
public WorkBook getWorkBook()
public int getSheetNum()
public WorkSheetHandle getWorkSheetHandle()
public boolean isDefaultCell()
public void setWorkSheetHandle(WorkSheetHandle handle)
WorkSheetHandle - handle - the new worksheet for this CellWorkSheetHandlepublic String getXML()
public String getXML(int[] mergedRange)
int[] - mergedRange - include merged ranges in the XML representation if not null
public void setHorizontalAlignment(int align)
int - align - constant value representing the horizontal alignment.constantspublic int getHorizontalAlignment()
constantspublic void setVerticalAlignment(int align)
int - align - constant value representing the vertical alignment.constantspublic int getVerticalAlignment()
constantspublic void setWrapText(boolean wrapit)
boolean - wrapit - true if cell text should be wrapped (default is false)public boolean getWrapText()
public void setCellRotation(int align)
int - align - an int representing the rotation.public int getCellRotation()
public int compareTo(Object ob)
compareTo in interface ComparableObject - ob - object to compare this CellHandle to
public boolean equals(Object ob)
equals in class ObjectObject - ob - object to compare this CellHandle to
public void setScript(int ss)
int - ss - super/sub script constant (0 = none, 1 = super, 2 = sub)public List calculateAffectedCells()
public List calculateAffectedCellsOnSheet()
public static final CellHandle copyCellToWorkSheet(CellHandle sourcecell,
WorkSheetHandle newsheet,
int row,
int col)
throws com.extentech.formats.XLS.CellPositionConflictException,
com.extentech.formats.XLS.CellNotFoundException
sourcecell - the cell to copynewsheet - the sheet to which the cell should be copiedrow - the row in which the copied cell should be placedcol - the row in which the copied cell should be placed
com.extentech.formats.XLS.CellPositionConflictException
com.extentech.formats.XLS.CellNotFoundException
public static CellHandle copyCellToWorkSheet(CellHandle sourcecell,
WorkSheetHandle newsheet,
int row,
int col,
boolean copyByValue)
sourcecell - the cell to copynewsheet - the sheet to which the cell should be copiedrow - the row in which the copied cell should be placedcol - the row in which the copied cell should be placedcopyByValue - whether to copy formulas' values instead of the
formulas themselves
public static final CellHandle copyCellToWorkSheet(CellHandle sourcecell,
WorkSheetHandle newsheet)
sourcecell - the cell to copytarget - worksheet to copy this cell into
public String getJSON()
public ValidationHandle getValidationHandle()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||