Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
//create a new excel
WritableWorkbook wwb = Workbook.createWorkbook(os);
WritableSheet ws = wwb.createSheet("Test Sheet 1",0);
File image = new File("f:\\2.png");
WritableImage wimage = new WritableImage(0,1,2,2,image);//x=0,y=1,column=2,row=2
ws.addImage(wimage);
wwb.write();
wwb.close();
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet();
ByteArrayOutputStream byteArrayOut =
new ByteArrayOutputStream();
BufferedImage bufferImg =
ImageIO.read(new File("D:\\fruit.PNG"));
ImageIO.write(bufferImg,"PNG",byteArrayOut);
HSSFClientAnchor anchor =
new HSSFClientAnchor
(5,0,500,122,(short) 0,
5,(short)10,15);
HSSFPatriarch patri =
sheet.createDrawingPatriarch();
patri.createPicture(anchor ,
wb.addPicture(byteArrayOut.toByteArray(),
HSSFWorkbook.PICTURE_TYPE_PNG));
ByteArrayOutputStream
outStream = new ByteArrayOutputStream();
wb.write(outStream);