Dear all
Does anyone can insert an image into a excel file?
I use the quick guide in hssf help as my program code..but it not work!
It can generate a excel successfully, but an empty content..
When I close this file, excel will alert unexpect error..
Anyone can help me to solve this issue.......
a = new HSSFClientAnchor( 0, 0, 1023, 255, (short) 1, 0, (short) 1, 0 );
group = patriarch.createGroup( a );
group.setCoordinates( 0, 0, 80 * 4 , 12 * 23 );
float verticalPointsPerPixel = a.getAnchorHeightInPoints(sheet) /
(float)Math.abs(group.getY2() - group.getY1());
g = new EscherGraphics( group, wb, Color.black, verticalPointsPerPixel );
g2d = new EscherGraphics2d( g );
g2d.drawimage(image, ...............) //image object is created by
java.awt
Joan