Class PoiExcelHelper


  • public final class PoiExcelHelper
    extends Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.apache.poi.ss.usermodel.CellStyle cloneStyleFrom​(org.apache.poi.ss.usermodel.Cell cell)  
      static <T extends org.apache.poi.ss.usermodel.CellStyle>
      T
      createCellStyle​(org.apache.poi.ss.usermodel.Workbook workbook)  
      static void evaluateFormula​(org.apache.poi.ss.usermodel.Cell cell)
      Evaluates formula in the cell to get new cell value.
      static org.apache.poi.ss.usermodel.Cell getCell​(int colIndex, int rowIndex, org.apache.poi.ss.usermodel.Sheet sheet)  
      static short[][] getCellBorderColors​(org.apache.poi.ss.usermodel.CellStyle style, org.apache.poi.ss.usermodel.Workbook workbook)  
      static org.apache.poi.ss.usermodel.BorderStyle[] getCellBorderStyles​(org.apache.poi.ss.usermodel.CellStyle style)  
      static org.apache.poi.ss.usermodel.Font getCellFont​(org.apache.poi.ss.usermodel.Cell cell)  
      static org.apache.poi.xssf.usermodel.XSSFColor getColor​(short[] color, org.apache.poi.xssf.usermodel.XSSFWorkbook workbook)  
      static short[] getFontColor​(org.apache.poi.ss.usermodel.Font font, org.apache.poi.ss.usermodel.Workbook workbook)  
      static org.apache.poi.ss.usermodel.Cell getOrCreateCell​(int colIndex, int rowIndex, org.apache.poi.ss.usermodel.Sheet sheet)  
      static void setCellBorderColors​(org.apache.poi.ss.usermodel.CellStyle style, short[][] colors, org.apache.poi.ss.usermodel.Workbook workbook)  
      static void setCellFont​(org.apache.poi.ss.usermodel.Cell cell, boolean boldWeight, short color, short fontHeight, String name, boolean italic, boolean strikeout, short typeOffset, byte underline)  
      static void setCellFontBold​(org.apache.poi.ss.usermodel.Cell cell, boolean boldweight)  
      static void setCellFontItalic​(org.apache.poi.ss.usermodel.Cell cell, boolean italic)  
      static void setCellFontUnderline​(org.apache.poi.ss.usermodel.Cell cell, byte underline)  
      static short[] toRgb​(short colorIndex, org.apache.poi.hssf.usermodel.HSSFWorkbook workbook)  
      static short[] toRgb​(org.apache.poi.ss.usermodel.Color color)  
    • Method Detail

      • getCell

        public static org.apache.poi.ss.usermodel.Cell getCell​(int colIndex,
                                                               int rowIndex,
                                                               org.apache.poi.ss.usermodel.Sheet sheet)
      • getOrCreateCell

        public static org.apache.poi.ss.usermodel.Cell getOrCreateCell​(int colIndex,
                                                                       int rowIndex,
                                                                       org.apache.poi.ss.usermodel.Sheet sheet)
      • evaluateFormula

        public static void evaluateFormula​(org.apache.poi.ss.usermodel.Cell cell)
        Evaluates formula in the cell to get new cell value.
      • createCellStyle

        public static <T extends org.apache.poi.ss.usermodel.CellStyle> T createCellStyle​(org.apache.poi.ss.usermodel.Workbook workbook)
      • cloneStyleFrom

        public static org.apache.poi.ss.usermodel.CellStyle cloneStyleFrom​(org.apache.poi.ss.usermodel.Cell cell)
      • getCellFont

        public static org.apache.poi.ss.usermodel.Font getCellFont​(org.apache.poi.ss.usermodel.Cell cell)
      • setCellFont

        public static void setCellFont​(org.apache.poi.ss.usermodel.Cell cell,
                                       boolean boldWeight,
                                       short color,
                                       short fontHeight,
                                       String name,
                                       boolean italic,
                                       boolean strikeout,
                                       short typeOffset,
                                       byte underline)
      • setCellFontBold

        public static void setCellFontBold​(org.apache.poi.ss.usermodel.Cell cell,
                                           boolean boldweight)
      • setCellFontItalic

        public static void setCellFontItalic​(org.apache.poi.ss.usermodel.Cell cell,
                                             boolean italic)
      • setCellFontUnderline

        public static void setCellFontUnderline​(org.apache.poi.ss.usermodel.Cell cell,
                                                byte underline)
      • toRgb

        public static short[] toRgb​(org.apache.poi.ss.usermodel.Color color)
      • toRgb

        public static short[] toRgb​(short colorIndex,
                                    org.apache.poi.hssf.usermodel.HSSFWorkbook workbook)
      • getFontColor

        public static short[] getFontColor​(org.apache.poi.ss.usermodel.Font font,
                                           org.apache.poi.ss.usermodel.Workbook workbook)
      • getCellBorderColors

        public static short[][] getCellBorderColors​(org.apache.poi.ss.usermodel.CellStyle style,
                                                    org.apache.poi.ss.usermodel.Workbook workbook)
      • getCellBorderStyles

        public static org.apache.poi.ss.usermodel.BorderStyle[] getCellBorderStyles​(org.apache.poi.ss.usermodel.CellStyle style)
      • setCellBorderColors

        public static void setCellBorderColors​(org.apache.poi.ss.usermodel.CellStyle style,
                                               short[][] colors,
                                               org.apache.poi.ss.usermodel.Workbook workbook)
      • getColor

        public static org.apache.poi.xssf.usermodel.XSSFColor getColor​(short[] color,
                                                                       org.apache.poi.xssf.usermodel.XSSFWorkbook workbook)