You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Felipe Gomes Vieira Ferreira <fe...@gmail.com> on 2007/09/24 22:22:30 UTC
Using images in HSSF
Hi.
I have the folowing code:
[code]
texto = (TextoConteudoHelp)iterable.next();
HSSFRow linha = sheet.createRow(numeroLinha++);
HSSFCell celula = linha.createCell(numeroCelula);
celula.setCellValue(texto.getTextoApresentacao1());
linha = sheet.createRow(numeroLinha++);
celula = linha.createCell(numeroCelula);
celula.setCellValue(texto.getTextoApresentacao2());
texto.getIdentificadorFigura();
ImagemHelpEJBDelegate imagemHelpEJBDelegate =
new ImagemHelpEJBDelegate();
imagemHelpTO =
imagemHelpEJBDelegate.retornaImagem(texto.getIdentificadorFigura());
if (imagemHelpTO != null) {
numeroLinha++;
HSSFClientAnchor ancora = new HSSFClientAnchor();
ancora.setCol1(numeroCelula);
ancora.setRow1(numeroLinha);
ancora.setAnchorType(0);
.
.
.
patriarch.createPicture(ancora,
documento.addPicture(output.toByteArray(),
HSSFWorkbook.PICTURE_TYPE_JPEG));
}
[/code]
but this is generating a excell file without picture.
What should i do to solve this problem?
The version of my POI is 3.0, 2007-09-24
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org