Constructor and Description |
---|
Cell()
Initializes to blank for XML parsing.
|
Cell(int inRow,
int inCol,
java.lang.String inInputValue)
Initializes a cell where the column is known.
|
Modifier and Type | Method and Description |
---|---|
static Cell |
createFullCell(int inRow,
int inCol,
java.lang.String inInputValue,
java.lang.Number inCalculatedValue,
java.lang.String inValue)
Creates a cell for the server library; it is not appropriate for
client side use (the server may reject these cells).
|
void |
generate(XmlWriter w,
ExtensionProfile extProfile)
Writes this cell as XML, omitting any unspecified fields.
|
int |
getCol()
Yields the column number starting with 1.
|
static ExtensionDescription |
getDefaultDescription(boolean repeats)
Returns the suggested extension description.
|
double |
getDoubleValue()
Gets the double-precision value.
|
XmlParser.ElementHandler |
getHandler(ExtensionProfile extProfile,
java.lang.String namespace,
java.lang.String localName,
org.xml.sax.Attributes attrs)
Yields an XML handler for parsing a Cell element.
|
java.lang.String |
getInputValue()
Yields the formula reference of the cell.
|
java.lang.Number |
getNumericValue()
Gets the calculated numeric value.
|
int |
getRow()
Yields the positional row number starting with 1.
|
java.lang.String |
getValue()
Yields the evaluated, formatted value of this cell.
|
Cell |
withNewInputValue(java.lang.String newInputValue)
Creates a new cell with a new input value, for the purpose of updating.
|
public Cell()
public Cell(int inRow, int inCol, java.lang.String inInputValue)
inRow
- the row number starting with 1 (-1 for unspecified)inCol
- the column number starting with 1 (-1 for unspecified)inInputValue
- the formula (null for unspecified)public static Cell createFullCell(int inRow, int inCol, java.lang.String inInputValue, java.lang.Number inCalculatedValue, java.lang.String inValue)
public int getRow()
public int getCol()
public java.lang.String getInputValue()
public java.lang.Number getNumericValue()
public double getDoubleValue()
public java.lang.String getValue()
public Cell withNewInputValue(java.lang.String newInputValue)
newInputValue
- the new input value, starting with '=' for a formula,
otherwise just a plain stringpublic static ExtensionDescription getDefaultDescription(boolean repeats)
repeats
- whether this cell might be repeated in parent contextpublic void generate(XmlWriter w, ExtensionProfile extProfile) throws java.io.IOException
public XmlParser.ElementHandler getHandler(ExtensionProfile extProfile, java.lang.String namespace, java.lang.String localName, org.xml.sax.Attributes attrs) throws ParseException, java.io.IOException
getHandler
in interface Extension
extProfile
- extension profilenamespace
- extension namespacelocalName
- tag name, without the namespace prefixattrs
- tag attributesParseException
- when an unexpected tag or badly-formatted
XML is detectedjava.io.IOException