Class PoiHelper


  • public class PoiHelper
    extends Object
    Class for adding support for older versions of Apache POI by using reflection
    Author:
    mlopez
    • Constructor Summary

      Constructors 
      Constructor Description
      PoiHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean cellTypeEquals​(org.apache.poi.ss.usermodel.Cell cell, org.apache.poi.ss.usermodel.CellType cellType)
      Verifies if the cell if of the supplied type
      static void setBlank​(org.apache.poi.ss.usermodel.Cell cell)
      Tries to set the cell to be blank
      static void setWidth​(org.apache.poi.xwpf.usermodel.XWPFTableCell currentCell, String string)
      Sets the width of the given XWPFTableCell
      static void setWonCTTblGridCol​(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblGridCol cctblgridcol, String string)
      Sets the width of the given CTTblGridCol
      static void setWonCTTblWidth​(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth tblW, String string)
      Sets the width of the given CTTblWidth
    • Constructor Detail

      • PoiHelper

        public PoiHelper()
    • Method Detail

      • setBlank

        public static void setBlank​(org.apache.poi.ss.usermodel.Cell cell)
        Tries to set the cell to be blank
        Parameters:
        cell -
      • cellTypeEquals

        public static boolean cellTypeEquals​(org.apache.poi.ss.usermodel.Cell cell,
                                             org.apache.poi.ss.usermodel.CellType cellType)
        Verifies if the cell if of the supplied type
        Parameters:
        cell -
        cellType -
        Returns:
      • setWonCTTblWidth

        public static void setWonCTTblWidth​(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth tblW,
                                            String string)
        Sets the width of the given CTTblWidth
        Parameters:
        tblW -
        string -
      • setWonCTTblGridCol

        public static void setWonCTTblGridCol​(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblGridCol cctblgridcol,
                                              String string)
        Sets the width of the given CTTblGridCol
        Parameters:
        cctblgridcol -
        string -
      • setWidth

        public static void setWidth​(org.apache.poi.xwpf.usermodel.XWPFTableCell currentCell,
                                    String string)
        Sets the width of the given XWPFTableCell
        Parameters:
        currentCell -
        string -