java.lang.Object
cn.toutatis.xvoid.axolotl.excel.writer.style.StyleHelper

public class StyleHelper extends Object
Excel样式助手
作者:
Toutatis_Gc
  • 字段详细资料

    • PRESET_CELL_LENGTH_MAP

      public static final Map<String,Integer> PRESET_CELL_LENGTH_MAP
      预置单元格长度
    • STANDARD_TITLE_FONT_SIZE

      public static Short STANDARD_TITLE_FONT_SIZE
      默认标题字体大小
    • STANDARD_TEXT_FONT_SIZE

      public static Short STANDARD_TEXT_FONT_SIZE
      默认文本字体大小
    • SERIAL_NUMBER_LENGTH

      public static final Integer SERIAL_NUMBER_LENGTH
      身份证号长度
  • 构造器详细资料

    • StyleHelper

      public StyleHelper()
  • 方法详细资料

    • getPresetCellLength

      public static Integer getPresetCellLength(String cellName)
      获取预置单元格长度
      参数:
      cellName - 单元格名称
      返回:
      预置单元格长度
    • createStandardCellStyle

      public static org.apache.poi.ss.usermodel.CellStyle createStandardCellStyle(org.apache.poi.ss.usermodel.Workbook workbook, org.apache.poi.ss.usermodel.BorderStyle borderStyle, org.apache.poi.ss.usermodel.IndexedColors borderColor, boolean bold, String fontName, short fontSize)
      创建通用的单元格样式
      参数:
      workbook - 工作表
      borderStyle - 边框样式
      bold - 加粗
      fontName - 字体名称
      fontSize - 字体大小
      borderColor - 边框颜色
      返回:
      单元格样式
    • renderMergeRegionStyle

      public static void renderMergeRegionStyle(org.apache.poi.ss.usermodel.Sheet sheet, org.apache.poi.ss.util.CellRangeAddress cellRangeAddress, org.apache.poi.ss.usermodel.CellStyle style)
      渲染合并单元格样式
      参数:
      sheet - 工作表
      cellRangeAddress - 合并单元格区域
      style - 单元格样式