Class BookHelper


  • public final class BookHelper
    extends java.lang.Object
    Helper for XSSF and HSSF book handling
    Author:
    Hawk, Kuro
    • Constructor Summary

      Constructors 
      Constructor Description
      BookHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String colorToBackgroundHTML​(org.apache.poi.ss.usermodel.Workbook book, org.apache.poi.ss.usermodel.Color color)  
      static java.lang.String colorToBorderHTML​(org.apache.poi.ss.usermodel.Workbook book, org.apache.poi.ss.usermodel.Color color)  
      static java.lang.String colorToForegroundHTML​(org.apache.poi.ss.usermodel.Workbook book, org.apache.poi.ss.usermodel.Color color)  
      static java.lang.String colorToHTML​(org.apache.poi.ss.usermodel.Workbook book, org.apache.poi.ss.usermodel.Color color)  
      static int getColumnFreeze​(org.apache.poi.ss.usermodel.Sheet sheet)
      gets the column freeze, 1 base
      static java.lang.String getFontHTMLColor​(org.apache.poi.ss.usermodel.Workbook book, org.apache.poi.ss.usermodel.Font font)  
      static byte[] getRgbWithSchemeHueMod​(byte[] rgb, double hueMod)  
      static byte[] getRgbWithSchemeLum​(byte[] rgb, double newLum)  
      static byte[] getRgbWithSchemeLumMod​(byte[] rgb, double lumMod)  
      static byte[] getRgbWithSchemeLumOff​(byte[] rgb, double lumOff)  
      static byte[] getRgbWithSchemeSat​(byte[] rgb, double newSat)  
      static byte[] getRgbWithSchemeSatMod​(byte[] rgb, double satMod)  
      static byte[] getRgbWithSchemeSatOff​(byte[] rgb, double satOff)  
      static byte[] getRgbWithSchemeShade​(byte[] rgb, double shade)  
      static byte[] getRgbWithSchemeTint​(byte[] rgb, double tint)  
      static byte[] getRgbWithTint​(byte[] rgb, double tint)  
      static int getRowFreeze​(org.apache.poi.ss.usermodel.Sheet sheet)
      gets the row freeze, 1 base
      static org.apache.poi.ss.usermodel.Color HTMLToColor​(org.apache.poi.ss.usermodel.Workbook book, java.lang.String color)  
      static boolean isFreezePane​(org.apache.poi.ss.usermodel.Sheet sheet)  
      static void setBottomBorderColor​(org.apache.poi.ss.usermodel.CellStyle style, org.apache.poi.ss.usermodel.Color color)  
      static void setFillBackgroundColor​(org.apache.poi.ss.usermodel.CellStyle newCellStyle, org.apache.poi.ss.usermodel.Color xlsColor)  
      static void setFillForegroundColor​(org.apache.poi.ss.usermodel.CellStyle newCellStyle, org.apache.poi.ss.usermodel.Color xlsColor)  
      static void setFontColor​(org.apache.poi.ss.usermodel.Workbook book, org.apache.poi.ss.usermodel.Font font, org.apache.poi.ss.usermodel.Color color)  
      static void setLeftBorderColor​(org.apache.poi.ss.usermodel.CellStyle style, org.apache.poi.ss.usermodel.Color color)  
      static void setRightBorderColor​(org.apache.poi.ss.usermodel.CellStyle style, org.apache.poi.ss.usermodel.Color color)  
      static void setTopBorderColor​(org.apache.poi.ss.usermodel.CellStyle style, org.apache.poi.ss.usermodel.Color color)  
      static java.lang.String toHex​(int num)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BookHelper

        public BookHelper()
    • Method Detail

      • getRowFreeze

        public static int getRowFreeze​(org.apache.poi.ss.usermodel.Sheet sheet)
        gets the row freeze, 1 base
      • getColumnFreeze

        public static int getColumnFreeze​(org.apache.poi.ss.usermodel.Sheet sheet)
        gets the column freeze, 1 base
      • isFreezePane

        public static boolean isFreezePane​(org.apache.poi.ss.usermodel.Sheet sheet)
      • getFontHTMLColor

        public static java.lang.String getFontHTMLColor​(org.apache.poi.ss.usermodel.Workbook book,
                                                        org.apache.poi.ss.usermodel.Font font)
      • colorToHTML

        public static java.lang.String colorToHTML​(org.apache.poi.ss.usermodel.Workbook book,
                                                   org.apache.poi.ss.usermodel.Color color)
      • colorToBorderHTML

        public static java.lang.String colorToBorderHTML​(org.apache.poi.ss.usermodel.Workbook book,
                                                         org.apache.poi.ss.usermodel.Color color)
      • colorToForegroundHTML

        public static java.lang.String colorToForegroundHTML​(org.apache.poi.ss.usermodel.Workbook book,
                                                             org.apache.poi.ss.usermodel.Color color)
      • colorToBackgroundHTML

        public static java.lang.String colorToBackgroundHTML​(org.apache.poi.ss.usermodel.Workbook book,
                                                             org.apache.poi.ss.usermodel.Color color)
      • getRgbWithSchemeTint

        public static byte[] getRgbWithSchemeTint​(byte[] rgb,
                                                  double tint)
      • getRgbWithSchemeShade

        public static byte[] getRgbWithSchemeShade​(byte[] rgb,
                                                   double shade)
      • getRgbWithSchemeHueMod

        public static byte[] getRgbWithSchemeHueMod​(byte[] rgb,
                                                    double hueMod)
      • getRgbWithSchemeSat

        public static byte[] getRgbWithSchemeSat​(byte[] rgb,
                                                 double newSat)
      • getRgbWithSchemeSatOff

        public static byte[] getRgbWithSchemeSatOff​(byte[] rgb,
                                                    double satOff)
      • getRgbWithSchemeSatMod

        public static byte[] getRgbWithSchemeSatMod​(byte[] rgb,
                                                    double satMod)
      • getRgbWithSchemeLum

        public static byte[] getRgbWithSchemeLum​(byte[] rgb,
                                                 double newLum)
      • getRgbWithSchemeLumOff

        public static byte[] getRgbWithSchemeLumOff​(byte[] rgb,
                                                    double lumOff)
      • getRgbWithSchemeLumMod

        public static byte[] getRgbWithSchemeLumMod​(byte[] rgb,
                                                    double lumMod)
      • getRgbWithTint

        public static byte[] getRgbWithTint​(byte[] rgb,
                                            double tint)
      • toHex

        public static java.lang.String toHex​(int num)
      • setLeftBorderColor

        public static void setLeftBorderColor​(org.apache.poi.ss.usermodel.CellStyle style,
                                              org.apache.poi.ss.usermodel.Color color)
      • setRightBorderColor

        public static void setRightBorderColor​(org.apache.poi.ss.usermodel.CellStyle style,
                                               org.apache.poi.ss.usermodel.Color color)
      • setTopBorderColor

        public static void setTopBorderColor​(org.apache.poi.ss.usermodel.CellStyle style,
                                             org.apache.poi.ss.usermodel.Color color)
      • setBottomBorderColor

        public static void setBottomBorderColor​(org.apache.poi.ss.usermodel.CellStyle style,
                                                org.apache.poi.ss.usermodel.Color color)
      • HTMLToColor

        public static org.apache.poi.ss.usermodel.Color HTMLToColor​(org.apache.poi.ss.usermodel.Workbook book,
                                                                    java.lang.String color)
      • setFillForegroundColor

        public static void setFillForegroundColor​(org.apache.poi.ss.usermodel.CellStyle newCellStyle,
                                                  org.apache.poi.ss.usermodel.Color xlsColor)
      • setFillBackgroundColor

        public static void setFillBackgroundColor​(org.apache.poi.ss.usermodel.CellStyle newCellStyle,
                                                  org.apache.poi.ss.usermodel.Color xlsColor)
      • setFontColor

        public static void setFontColor​(org.apache.poi.ss.usermodel.Workbook book,
                                        org.apache.poi.ss.usermodel.Font font,
                                        org.apache.poi.ss.usermodel.Color color)