日期:2014-05-17 浏览次数:20919 次
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();
}