Class ImageModifyHandler

java.lang.Object
cn.net.pap.common.excel.handle.ImageModifyHandler
All Implemented Interfaces:
com.alibaba.excel.event.Handler, com.alibaba.excel.event.Order, com.alibaba.excel.write.handler.CellWriteHandler, com.alibaba.excel.write.handler.WriteHandler

public class ImageModifyHandler extends Object implements com.alibaba.excel.write.handler.CellWriteHandler
图像填充完合并后的单元格 - 如果需要将图像完成填充至一个被合并的单元格,可使用如下方式 使用方式: WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new ImageModifyHandler()).build();
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static Float
     
    static Integer
     
    static Integer
     
    static Float
     
    static Integer
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    afterCellDataConverted(com.alibaba.excel.write.metadata.holder.WriteSheetHolder writeSheetHolder, com.alibaba.excel.write.metadata.holder.WriteTableHolder writeTableHolder, com.alibaba.excel.metadata.data.WriteCellData<?> cellData, org.apache.poi.ss.usermodel.Cell cell, com.alibaba.excel.metadata.Head head, Integer relativeRowIndex, Boolean isHead)
    后单元格数据转换
    static int
    getMergeColumNum(org.apache.poi.ss.usermodel.Cell cell, org.apache.poi.ss.usermodel.Sheet sheet)
    得到合并列num
    static int
    getMergeRowNum(org.apache.poi.ss.usermodel.Cell cell, org.apache.poi.ss.usermodel.Sheet sheet)
    得到合并行num

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.alibaba.excel.write.handler.CellWriteHandler

    afterCellCreate, afterCellCreate, afterCellDataConverted, afterCellDispose, afterCellDispose, beforeCellCreate, beforeCellCreate

    Methods inherited from interface com.alibaba.excel.event.Handler

    order
  • Field Details

    • standardCharacterWidth

      public static Integer standardCharacterWidth
    • character2PixelFactor

      public static Float character2PixelFactor
    • pixel2InchFactor

      public static Integer pixel2InchFactor
    • dpi

      public static Integer dpi
    • rowHeight2PixelFactor

      public static Float rowHeight2PixelFactor
  • Constructor Details

    • ImageModifyHandler

      public ImageModifyHandler()
  • Method Details

    • afterCellDataConverted

      public void afterCellDataConverted(com.alibaba.excel.write.metadata.holder.WriteSheetHolder writeSheetHolder, com.alibaba.excel.write.metadata.holder.WriteTableHolder writeTableHolder, com.alibaba.excel.metadata.data.WriteCellData<?> cellData, org.apache.poi.ss.usermodel.Cell cell, com.alibaba.excel.metadata.Head head, Integer relativeRowIndex, Boolean isHead)
      后单元格数据转换
      Specified by:
      afterCellDataConverted in interface com.alibaba.excel.write.handler.CellWriteHandler
      Parameters:
      writeSheetHolder - 写单夹
      writeTableHolder - 写表夹
      cellData - 单元格数据
      cell - 细胞
      head - 头
      relativeRowIndex - 相对行索引
      isHead - 是头
    • getMergeRowNum

      public static int getMergeRowNum(org.apache.poi.ss.usermodel.Cell cell, org.apache.poi.ss.usermodel.Sheet sheet)
      得到合并行num
      Parameters:
      cell - 细胞
      sheet - 表
      Returns:
      int
    • getMergeColumNum

      public static int getMergeColumNum(org.apache.poi.ss.usermodel.Cell cell, org.apache.poi.ss.usermodel.Sheet sheet)
      得到合并列num
      Parameters:
      cell - 细胞
      sheet - 表
      Returns:
      int