Class ExcelStylesManager

java.lang.Object
org.primefaces.util.ExcelStylesManager
Direct Known Subclasses:
ExcelXmlStylesManager

public class ExcelStylesManager extends Object
  • Field Details

    • DEFAULT_FONT

      protected static final String DEFAULT_FONT
      See Also:
    • wb

      protected final org.apache.poi.ss.usermodel.Workbook wb
    • options

      protected final ExcelOptions options
  • Constructor Details

    • ExcelStylesManager

      protected ExcelStylesManager(org.apache.poi.ss.usermodel.Workbook wb, Locale locale, ExcelOptions options)
  • Method Details

    • createExcelStylesManager

      public static ExcelStylesManager createExcelStylesManager(org.apache.poi.ss.usermodel.Workbook wb, Locale locale, ExcelOptions options)
    • updateCell

      public void updateCell(UIColumn column, org.apache.poi.ss.usermodel.Cell cell, String value)
      If ExcelOptions.isStronglyTypedCells = true then for cells check:
       Numeric - String that are all numbers make them a numeric cell
       Currency - Convert to currency cell so math can be done in Excel
       String - fallback to just a normal string cell
       
      Possible future enhancement of Date cells as well.
      Parameters:
      column - the column from which value comes
      cell - the cell to operate on
      value - the String value to put in the cell
    • getFacetStyle

      public org.apache.poi.ss.usermodel.CellStyle getFacetStyle()
    • applyFacetOptions

      protected void applyFacetOptions(org.apache.poi.ss.usermodel.CellStyle style)
    • applyCellOptions

      protected void applyCellOptions(org.apache.poi.ss.usermodel.CellStyle style)
    • createRichTextString

      public org.apache.poi.ss.usermodel.RichTextString createRichTextString(String value)
    • getCurrencyExcelFormat

      protected String getCurrencyExcelFormat()
    • getFormattedIntegerExcelFormat

      protected String getFormattedIntegerExcelFormat()
    • getFormattedDecimalExcelFormat

      protected String getFormattedDecimalExcelFormat()