5
@Override
public void afterCellDataConverted(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, CellData cellData, Cell cell, Head head, Integer relativeRowIndex, Boolean isHead) {
if (cellData.getType() == CellDataTypeEnum.IMAGE) {
//设置列宽
head.setColumnWidthProperty(new ColumnWidthProperty(90));
//设置行高
cell.getRow().setHeight((short) 2200);
//设置单元格超连接
CreationHelper helper = writeSheetHolder.getSheet().getWorkbook().getCreationHelper();
Hyperlink hyperlink = helper.createHyperlink(HyperlinkType.URL);
hyperlink.setAddress(cellData.getData().toString());
cell.setHyperlink(hyperlink);
cellData.setColumnIndex(relativeRowIndex);
}
}