标签:读取excel 安全性 write user poi 上传 服务器 span 需要
FileInputStream ins = new FileInputStream(filePath); wookbook = new XSSFWorkbook(ins); ins.close(); List<XSSFPictureData> pictures = wookbook.getAllPictures(); for (int i= 0; i < pictures.size(); i++) { XSSFPictureData pictureData = pictures.get(i); byte[] data = pictureData.getData(); String ext = pictureData.suggestFileExtension(); FileOutputStream out = new FileOutputStream("C:\\Users\\Administrator\\Desktop\\imanger\\pict"+i+"."+ext); out.write(data); out.close(); }
标签:读取excel 安全性 write user poi 上传 服务器 span 需要
原文地址:http://www.cnblogs.com/wwdxf/p/6270644.html