javaexceljxl

Inserting image in to the excel cell using jxl api


I have to insert image in to the excel cell using jxl api
I have tried with some sample code but it will insert at some coordinator, but I want in to at particular cell index or inside cell.
Here is sample code that I found while searching for this.

Anyone has solution for this?


Solution

  • From a discussion on channel9:

    No version of Excel allows you to insert a picture into a cell. Pictures are inserted into the worksheet and will always float. One of the properties of a picture can be set to "move and size with cells" but that only moves or stretches the picture when the underlying rows and columns are inserted, deleted or sized. It does not confine a picture to a cell.

    Here is a step-by-step procedure on how to do it from Excel, maybe you can mime it programmatically.