java 导出excel 附带图片,思路将后台数据里保存的图片url转为file ,添加到excel里导出
代码示例 String imgPath
= filePath
+item
.getFilePath();
File imgFile
=getFile(imgPath
);
WritableImage image
= new WritableImage(cellNum
, count
, 1, 1, imgFile
);
ws
.addImage(image
);
图片url转file文件见另外文章有导出完整代码
转载请注明原文地址:https://tech.qufami.com/read-29249.html