1. import
2. import
3. import
4. import
5. import
6. 
7. import
8. 
9. import
10. import
11. import
12. import
13. 
14. 
15. public class
16. public static void
17.         exportChartToExcel();
18.     }
19.     
20. private static void
21. "E://platoDemo.xls";
22. "E://platoDemo.jpg";
23.         
24. new
25.         HSSFSheet sheet = wb.createSheet();
26.                 
27. new
28. try
29. new
30.                         
31. "JPG", byteArrayOut);
32. new HSSFClientAnchor(0, 0, 0, 0,(short) 0, 0, (short) 10, 20);
33.             
34.             HSSFPatriarch patri = sheet.createDrawingPatriarch();
35.             patri.createPicture(anchor, wb.addPicture(byteArrayOut
36.                     .toByteArray(), HSSFWorkbook.PICTURE_TYPE_PNG));
37. new
38.             wb.write(outStream);
39. catch
40. // TODO Auto-generated catch block 
41.             e.printStackTrace();
42.         }
43.     }  
44. }
45.