poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rana Aich <ranaa...@yahoo.com>
Subject HELP: Problem in compiling while adding image to Excel
Date Wed, 26 Jul 2006 21:48:47 GMT
Hi All,
 I'm facing compilation problem when I try to add an
Image to Excel Workbook. Infact the example shown at
http://jakarta.apache.org/poi/hssf/quick-guide.html#Images
doesn't compile at all the library that I have
downloaded poi-2.5.1-final-20040804.jar.

This example is not compiling:
--------------------------------------------------
// Create the drawing patriarch.  This is the top
level container for
    // all shapes. This will clear out any existing
shapes for that sheet.
    HSSFPatriarch patriarch =
sheet5.createDrawingPatriarch();

    HSSFClientAnchor anchor;
    anchor = new
HSSFClientAnchor(0,0,0,255,(short)2,2,(short)4,7);
    anchor.setAnchorType( 2 );
    patriarch.createPicture(anchor, loadPicture(
"src/resources/logos/logoKarmokar4.png", wb ));
-------------------------------------------------------

In the poi libarary documentation I couldn't find the
createPicture() function for class HSSFPatriarch. Also
addPicture() for class HSSFWorkbook is missing.

So how do I add an image to Excel File? Am I missing
something? I have seen most of the previous email
threads - but most of them point to this particular
solution which unfotunately doesn't compile. Am I
working with an old jar file?

Thanking you in advance.

Regards,

Rana




---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


Mime
View raw message