org.apache.poi.xssf.model
public class Table extends POIXMLDocumentPart
DEFAULT_XML_OPTIONS| Constructor and Description |
|---|
Table() |
Table(PackagePart part,
PackageRelationship rel) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
commit()
Save the content in the underlying package part.
|
java.lang.String |
getCommonXpath()
Calculates the xpath of the root element for the table.
|
CTTable |
getCTTable() |
CellReference |
getEndCellReference()
The reference for the cell in the bottom-right part of the table
(see Open Office XML Part 4: chapter 3.5.1.2, attribute ref)
|
long |
getNumerOfMappedColumns()
the number of mapped table columns (see Open Office XML Part 4: chapter 3.5.1.4)
|
int |
getRowCount()
Gets the total number of rows in the selection.
|
CellReference |
getStartCellReference()
The reference for the cell in the top-left part of the table
(see Open Office XML Part 4: chapter 3.5.1.2, attribute ref)
|
java.util.List<XSSFXmlColumnPr> |
getXmlColumnPrs() |
XSSFSheet |
getXSSFSheet() |
boolean |
mapsTo(long id)
Checks if this Table element contains even a single mapping to the map identified by id
|
void |
readFrom(java.io.InputStream is) |
void |
writeTo(java.io.OutputStream out) |
addRelation, createRelationship, createRelationship, createRelationship, getPackagePart, getPackageRelationship, getParent, getRelations, onDocumentCreate, onDocumentRead, onSave, read, removeRelation, toStringpublic Table()
public Table(PackagePart part, PackageRelationship rel) throws java.io.IOException
java.io.IOExceptionpublic void readFrom(java.io.InputStream is)
throws java.io.IOException
java.io.IOExceptionpublic XSSFSheet getXSSFSheet()
public void writeTo(java.io.OutputStream out)
throws java.io.IOException
java.io.IOExceptionprotected void commit()
throws java.io.IOException
POIXMLDocumentPart
protected void commit() throws IOException {
PackagePart part = getPackagePart();
OutputStream out = part.getOutputStream();
XmlObject bean = getXmlBean(); //the "model" which holds changes in memory
bean.save(out, DEFAULT_XML_OPTIONS);
out.close();
}
commit in class POIXMLDocumentPartjava.io.IOExceptionpublic CTTable getCTTable()
public boolean mapsTo(long id)
id - the XSSFMap IDpublic java.lang.String getCommonXpath()
public java.util.List<XSSFXmlColumnPr> getXmlColumnPrs()
public long getNumerOfMappedColumns()
public CellReference getStartCellReference()
public CellReference getEndCellReference()
public int getRowCount()
Copyright 2016 The Apache Software Foundation or its licensors, as applicable.