版本是 3.1.1
//目标excle String fileName = "D:\123-fill.xlsx";
//填充excle中 客户签名字段evaluatorSign 是一张图片 ExcelWriter excelWriter = EasyExcel .write(fileName) .registerWriteHandler(new ImageCellWriteHandler(imageRowIndexs)) .withTemplate(inputStream).build();
Map<String, Object> param = new HashMap<>(); //备注这里的evaluatorSign 是客户签名的一张图片 这里不做具体地址展示 使用XXX代替 getImageFromNetByUrl 返回的类型是byte[] param.put("evaluatorSign", getImageFromNetByUrl("xx")); excelWriter.fill(param, writeSheet); excelWriter.finish();
这样一来就会报错 Can not find 'Converter' support class byte[]