Class ExcelDrawing

java.lang.Object
org.miaixz.bus.office.excel.writer.ExcelDrawing

public class ExcelDrawing extends Object
Excel绘制工具类 用于辅助写出指定的图形
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • ExcelDrawing

      public ExcelDrawing()
  • Method Details

    • drawingPicture

      public static void drawingPicture(org.apache.poi.ss.usermodel.Sheet sheet, byte[] pictureData, ExcelPictureType imgType, SimpleAnchor clientAnchor)
      写出图片,本方法只是将数据写入Workbook中的Sheet,并不写出到文件 添加图片到当前sheet中
      Parameters:
      sheet - Sheet
      pictureData - 数据bytes
      imgType - 图片类型,对应poi中Workbook类中的图片类型2-7变量
      clientAnchor - 图片的位置和大小信息
    • drawingSimpleShape

      public static void drawingSimpleShape(org.apache.poi.ss.usermodel.Sheet sheet, SimpleAnchor clientAnchor, ShapeConfig shapeConfig)
      绘制简单形状
      Parameters:
      sheet - Sheet
      clientAnchor - 绘制区域信息
      shapeConfig - 形状配置,包括形状类型、线条样式、线条宽度、线条颜色、填充颜色等
    • drawingCellComment

      public static void drawingCellComment(org.apache.poi.ss.usermodel.Cell cell, SimpleAnchor clientAnchor, String content)
      添加批注
      Parameters:
      cell - Cell
      clientAnchor - 绘制区域信息
      content - 内容