You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Vitaly Rozhkov <vi...@googlemail.com> on 2012/04/09 21:36:03 UTC

Creating hyperlink on the image inserted into the sheet using HSSF or XSSF.

Hi All,
I have the question: can I attach hyperlink to the image not to the cell
content?
I need to get hyperlink opened when I click on the image in the Excel
document.
I can create hyperlink when I edit the document in MS Excel 2003 by right
button clicking on image and selecting 'hyperlink'. But how can I do it
using Apache POI HSSF or XSSF API?

Re: Creating hyperlink on the image inserted into the sheet using HSSF or XSSF.

Posted by Yegor Kozlov <ye...@dinom.ru>.
The short answer is no, you cannot assign hyperlinks to images and
other graphic objects (shapes,  word art, etc.). Neither HSSF nor XSSF
support it.

In theory, you can do it in XSSF: create a sample .xlsx file with a
hypelirnk assigned to an image, unzip it and see how Excel sets such
hyperlinks.
Then you can construct the required xml with low-level xml beans.

Yegor

On Mon, Apr 9, 2012 at 11:36 PM, Vitaly Rozhkov
<vi...@googlemail.com> wrote:
> Hi All,
> I have the question: can I attach hyperlink to the image not to the cell
> content?
> I need to get hyperlink opened when I click on the image in the Excel
> document.
> I can create hyperlink when I edit the document in MS Excel 2003 by right
> button clicking on image and selecting 'hyperlink'. But how can I do it
> using Apache POI HSSF or XSSF API?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org