Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to insert images in excel using jxl API

 
Manikanta Mogalluri
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Could you please help me to insert images in excel workbook using jxl API.

Kindly give me any sample code.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The jxl.write.WritableSheet class has the addImage method for that. Note that only PNG images are supported. If you have a JPEG, GIF or BMP you can use the javax.imageio.ImageIO class to convert them to PNG.
 
Manikanta Mogalluri
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf,

Thanks for giving the method.

It will be very useful if give me the sample code for this issue.

 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Search for "jexcelapi faq", it has an example.
 
shareeef hiasat
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This code i used and worked but i faced little problems with sizing the image

As you see you must convert to PNG because its the only one supported

As if you worndered about if you can put it in some cell you cant stackoverflow inserting image into cell jxl


;
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic