public static void getePic() throws IOException {
HSSFWorkbook wb = new HSSFWorkbook(ReaderFileUtils.getFile("out.xls"));
List<HSSFPictureData> ls = wb.getAllPictures();
byte[] data = new byte[1024];
int i=0;
for(HSSFPictureData pd : ls){
data=pd.getData();
IOUtils.write(data, new FileOutputStream("out"+(i++)+".jpg"));
}
}
POI 读取图片
最新推荐文章于 2024-07-09 21:03:28 发布