Class ExcelDrawing
java.lang.Object
org.miaixz.bus.office.excel.writer.ExcelDrawing
Excel绘制工具类 用于辅助写出指定的图形
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddrawingCellComment(org.apache.poi.ss.usermodel.Cell cell, SimpleAnchor clientAnchor, String content) 添加批注static voiddrawingPicture(org.apache.poi.ss.usermodel.Sheet sheet, byte[] pictureData, ExcelPictureType imgType, SimpleAnchor clientAnchor) 写出图片,本方法只是将数据写入Workbook中的Sheet,并不写出到文件 添加图片到当前sheet中static voiddrawingSimpleShape(org.apache.poi.ss.usermodel.Sheet sheet, SimpleAnchor clientAnchor, ShapeConfig shapeConfig) 绘制简单形状
-
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-SheetpictureData- 数据bytesimgType- 图片类型,对应poi中Workbook类中的图片类型2-7变量clientAnchor- 图片的位置和大小信息
-
drawingSimpleShape
public static void drawingSimpleShape(org.apache.poi.ss.usermodel.Sheet sheet, SimpleAnchor clientAnchor, ShapeConfig shapeConfig) 绘制简单形状- Parameters:
sheet-SheetclientAnchor- 绘制区域信息shapeConfig- 形状配置,包括形状类型、线条样式、线条宽度、线条颜色、填充颜色等
-
drawingCellComment
public static void drawingCellComment(org.apache.poi.ss.usermodel.Cell cell, SimpleAnchor clientAnchor, String content) 添加批注- Parameters:
cell-CellclientAnchor- 绘制区域信息content- 内容
-