protected class HtmlToExcel.XmlCell
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private int |
__index
The cell's spreadsheet column index.
|
private org.w3c.dom.Node |
__node
An XML document table cell node.
|
private HtmlToExcel.XmlTable |
__parent
The cell's parent XML table object.
|
private static long |
serialVersionUID
The class' serialization version id.
|
Modifier | Constructor and Description |
---|---|
protected |
XmlCell(HtmlToExcel.XmlTable parent,
org.w3c.dom.Node node,
int index)
Constructs a new XML table cell node.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getAttr(java.lang.String name)
Returns an attribute value from the XML cell node.
|
protected int |
getColSpan()
Returns the column span value for the cell.
|
protected java.lang.String |
getValue()
Returns the text value for the cell.
|
protected boolean |
isText(java.lang.String s)
Answers if the given string is a text value.
|
protected java.util.Date |
parseDate(java.lang.String s)
Parses the given string as a date and returns the result.
|
protected java.lang.Number |
parseNumber(java.lang.String s)
Parses the given string as a number and returns the result.
|
protected void |
toExcel()
Performs translation of the XML table cell to an Excel spreadsheet cell.
|
private static final long serialVersionUID
private HtmlToExcel.XmlTable __parent
private org.w3c.dom.Node __node
private int __index
protected XmlCell(HtmlToExcel.XmlTable parent, org.w3c.dom.Node node, int index)
parent
- (XmlTable) The cell's parent XML table object.node
- (Node) A table cell node from the XML document object.index
- (int) The column index of the cell (zero based).protected java.lang.String getAttr(java.lang.String name)
name
- (String) The name of the attribute to retrieve.protected int getColSpan()
protected java.lang.String getValue()
protected boolean isText(java.lang.String s)
s
- (String) The string to check.true
if the string is a text value,
otherwise false
.protected java.util.Date parseDate(java.lang.String s)
s
- (string) The string to parse.null
if the string could
could not be parsed into a date.protected java.lang.Number parseNumber(java.lang.String s)
s
- (string) The string to parse.null
if the string
could not be parsed into a number.protected void toExcel() throws java.lang.Exception
java.lang.Exception
- - if an error occurs during processing.