You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Princess <he...@googlemail.com> on 2008/12/11 16:49:22 UTC
display image in a cell thru a Excel UDF
I have a function which shows the .png in a cell.
Now the parameter to the function is a dynamic path
for eg =ShowPicD("C:\test\a.png") when i try this out
in excel it works fine .But when i try the same thru POI and
set this as a formula it throws error and does not show
the image in the cell ..
Can anyone tell me where do i go wrong
HSSFCell cellImagePath = rowImagePath.getCell((short) 5);
if(cellImagePath == null){
cellImagePath = rowImagePath.createCell((short) 5);
String formula ="ShowPicD(\""+imagePath+"\")";
cellImagePath.setCellFormula(formula);
--
Hepzibah
**Hope can be ignited by a spark of encouragement *****