打开excel 其他数据还在。但是图片就没有了。写入的时候都是基本的String类型数据。。。求解!
------解决方案--------------------------------------------------------
http://blog.csdn.net/st780206/article/details/4412988
http://blog.csdn.net/lizhenchao2009/article/details/5740131
------解决方案--------------------------------------------------------
POI的我没弄过,JXL的话可以给你提供一小段代码:
- Java code
public static void main(String[] args) throws Exception{ WritableWorkbook book = Workbook.createWorkbook(new File("C:\\Documents and Settings\\pKF58059\\My Documents\\My Pictures\\test.xls")); WritableSheet sheet = book.createSheet("sheet1", 0); File file = new File("C:\\Documents and Settings\\pKF58059\\My Documents\\My Pictures\\4298534_1326781519AYll.png"); WritableImage img = new WritableImage(1, 1, 4, 4, file); sheet.addImage(img); book.write(); book.close(); }