problem in inserting images to excel sheet

By: Deepak Borule - deepakborule
problem in inserting images to excel sheet
2003-11-19 02:18
Hi,
I am generating microsoft excel sheets using japser reports
I am required to insert image in excel. I am going so by

<image scaleImage="RetainShape" hAlign="Center" vAlign="Top">
<reportElement x="0" y="10" width="700" height="355"/>
<imageExpression>"abc.jpg"</imageExpression>
</image>

But nothing is getting inserted in the excel sheet.

Can anybody help me out.

Thanks
Deepak




By: Teodor Danciu - teodord
RE: problem in inserting images to excel shee
2003-11-29 00:16

Hi,

Images are not supported by the POI library we use
to generate XLS content.

Thank you,
Teodor
2002 JI Open Discussion's picture
Joined: Aug 10 2006 - 3:28am
Last seen: 16 years 7 months ago

3 Answers:

is there any way to insert logo image in my excel sheet
rineesh_ka's picture
Joined: Jun 4 2007 - 11:17pm
Last seen: 15 years 10 months ago

I am not using JRXML file rather just creating my design using java APIs only. But i am not able to get the picture in Excel sheet. Please help me on the code urgently.

 

JRDesignBand bandDetail = new JRDesignBand();

bandDetail.setHeight(fontMetric.getHeight() + 1);

bandDetail.setSplitAllowed(false);

JRDesignImage image = new JRDesignImage(jasperDesign);

image.setScaleImage(JRImage.SCALE_IMAGE_CLIP);


JRDesignExpression jrExpress = new JRDesignExpression();

JRDesignExpressionChunk expressChunk = new JRDesignExpressionChunk();

String str = "http://www.google.de/intl/de_de/images/logo.gif";

expressChunk.setText("\""+str+"\"");

jrExpress.addChunk(expressChunk);

jrExpress.setValueClass(String.class);

image.setExpression(jrExpress);

 bandDetail.addElement(image);

 

Regards

~Aman

amanmahajan's picture
Joined: Sep 11 2008 - 1:23am
Last seen: 14 years 6 months ago

Try this Excel API which inserts image in your excel document using java language and you can also use other language to insert any feature in your excel file using this API.

zarfishan.biztek's picture
Joined: Jul 18 2013 - 12:38am
Last seen: 9 years 8 months ago
Feedback
randomness