Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.xssf.usermodel
Class XSSFTable

    java.lang.Object
      org.apache.poi.POIXMLDocumentPart
          org.apache.poi.xssf.usermodel.XSSFTable

    public class XSSFTable

extends POIXMLDocumentPart

This class implements the Table Part (Open Office XML Part 4: chapter 3.5.1) This implementation works under the assumption that a table contains mappings to a subtree of an XML. The root element of this subtree an occur multiple times (one for each row of the table). The child nodes of the root element can be only attributes or element with maxOccurs=1 property set

Author:
  Roberto Manicardi

Field Summary

Fields inherited from class org.apache.poi.POIXMLDocumentPart
`DEFAULT_XML_OPTIONS`

Constructor Summary
`XSSFTable()`
`XSSFTable(PackagePart part, PackageRelationship rel)`

Method Summary
`java.lang.String` | `getCommonXpath()` Calculates the xpath of the root element for the table.
`org.openxmlformats.schemas.spreadsheetml.x2006.main.CTTable` | `getCTTable()`
`java.lang.String` | `getDisplayName()`
`org.apache.poi.ss.util.CellReference` | `getEndCellReference()`
`java.lang.String` | `getName()`
`long` | `getNumerOfMappedColumns()`
`int` | `getRowCount()`
`org.apache.poi.ss.util.CellReference` | `getStartCellReference()`
`java.util.List` | `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` | `setDisplayName(java.lang.String name)` Changes the display name of the Table
`void` | `setName(java.lang.String name)` Changes the name of the Table
`void` | `writeTo(java.io.OutputStream out)`

Methods inherited from class org.apache.poi.POIXMLDocumentPart
`addRelation, createRelationship, createRelationship, getPackagePart, getPackageRelationship, getParent, getRelationById, getRelationId, getRelations, toString`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### XSSFTable

    public XSSFTable()

### XSSFTable

    public XSSFTable(PackagePart part,
                     PackageRelationship rel)
              throws java.io.IOException

Throws:
  `java.io.IOException`

Method Detail

### readFrom

    public void readFrom(java.io.InputStream is)
                  throws java.io.IOException

  Throws:
    `java.io.IOException`

### getXSSFSheet

    public XSSFSheet getXSSFSheet()

### writeTo

    public void writeTo(java.io.OutputStream out)
                 throws java.io.IOException

  Throws:
    `java.io.IOException`

### getCTTable

    public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTTable getCTTable()

### mapsTo

    public boolean mapsTo(long id)

  Checks if this Table element contains even a single mapping to the map identified by id

  Parameters:
    `id` - the XSSFMap ID
  Returns:
    true if the Table element contain mappings

### getCommonXpath

    public java.lang.String getCommonXpath()

  Calculates the xpath of the root element for the table. This will be the common part of all the mapping's xpaths

  Returns:
    the xpath of the table's root element

### getXmlColumnPrs

    public java.util.List getXmlColumnPrs()

### getName

    public java.lang.String getName()

  Returns:
    the name of the Table, if set

### setName

    public void setName(java.lang.String name)

  Changes the name of the Table

### getDisplayName

    public java.lang.String getDisplayName()

  Returns:
    the display name of the Table, if set

### setDisplayName

    public void setDisplayName(java.lang.String name)

  Changes the display name of the Table

### getNumerOfMappedColumns

    public long getNumerOfMappedColumns()

  Returns:
    the number of mapped table columns (see Open Office XML Part 4: chapter 3.5.1.4)

### getStartCellReference

    public org.apache.poi.ss.util.CellReference getStartCellReference()

  Returns:
    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)

### getEndCellReference

    public org.apache.poi.ss.util.CellReference getEndCellReference()

  Returns:
    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)

### getRowCount

    public int getRowCount()

  Returns:
    the total number of rows in the selection. (Note: in this version autofiltering is ignored)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD