Documentation of 'org.apache.poi.xssf.model.StylesTable' Java class
StylesTable
org.apache.poi.xssf.model

Class StylesTable



  • public class StylesTable
    extends POIXMLDocumentPart
    Table of styles shared across all sheets in a workbook.
    • Field Detail

      • FIRST_CUSTOM_STYLE_ID

        public static final int FIRST_CUSTOM_STYLE_ID
        The first style id available for use as a custom style
        See Also:
        Constant Field Values
    • Constructor Detail

      • StylesTable

        public StylesTable()
        Create a new, empty StylesTable
    • Method Detail

      • getNumberFormatAt

        public java.lang.String getNumberFormatAt(int idx)
      • putNumberFormat

        public int putNumberFormat(java.lang.String fmt)
      • getFontAt

        public XSSFFont getFontAt(int idx)
      • putFont

        public int putFont(XSSFFont font,
                           boolean forceRegistration)
        Records the given font in the font table. Will re-use an existing font index if this font matches another, EXCEPT if forced registration is requested. This allows people to create several fonts then customise them later. Note - End Users probably want to call XSSFFont.registerTo(StylesTable)
      • putFont

        public int putFont(XSSFFont font)
      • getFonts

        public java.util.List<XSSFFont> getFonts()
      • getNumberFormats

        public java.util.Map<java.lang.Integer,java.lang.String> getNumberFormats()
      • getCellXfAt

        public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTXf getCellXfAt(int idx)
      • putCellXf

        public int putCellXf(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTXf cellXf)
      • replaceCellXfAt

        public void replaceCellXfAt(int idx,
                                    org.openxmlformats.schemas.spreadsheetml.x2006.main.CTXf cellXf)
      • getCellStyleXfAt

        public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTXf getCellStyleXfAt(int idx)
      • putCellStyleXf

        public int putCellStyleXf(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTXf cellStyleXf)
      • replaceCellStyleXfAt

        public void replaceCellStyleXfAt(int idx,
                                         org.openxmlformats.schemas.spreadsheetml.x2006.main.CTXf cellStyleXf)
      • getNumCellStyles

        public int getNumCellStyles()
        get the size of cell styles
      • _getNumberFormatSize

        public int _getNumberFormatSize()
        For unit testing only
      • _getXfsSize

        public int _getXfsSize()
        For unit testing only
      • _getStyleXfsSize

        public int _getStyleXfsSize()
        For unit testing only
      • getCTStylesheet

        public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTStylesheet getCTStylesheet()
        For unit testing only!
      • _getDXfsSize

        public int _getDXfsSize()
      • writeTo

        public void writeTo(java.io.OutputStream out)
                     throws java.io.IOException
        Write this table out as XML.
        Parameters:
        out - The stream to write to.
        Throws:
        java.io.IOException - if an error occurs while writing.
      • getDxfAt

        public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDxf getDxfAt(int idx)
      • putDxf

        public int putDxf(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDxf dxf)
      • findFont

        public XSSFFont findFont(short boldWeight,
                                 short color,
                                 short fontHeight,
                                 java.lang.String name,
                                 boolean italic,
                                 boolean strikeout,
                                 short typeOffset,
                                 byte underline)
        Finds a font that matches the one with the supplied attributes

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.