java 导出excel 附带图片

tech2026-10-02  2

java 导出excel 附带图片,思路将后台数据里保存的图片url转为file ,添加到excel里导出

代码示例 String imgPath = filePath +item.getFilePath(); //图片url File imgFile =getFile(imgPath); //图片url转file文件见另外文章 WritableImage image = new WritableImage(cellNum, count, 1, 1, imgFile); ws.addImage(image); 图片url转file文件见另外文章有导出完整代码
最新回复(0)