开发者

Is there a way to add an image to a Cell using the POI Api?

开发者 https://www.devze.com 2022-12-17 07:35 出处:网络
I\'m making an application that converts our data structure to an excel file. We\'re currently using POI to do the conversion.

I'm making an application that converts our data structure to an excel file. We're currently using POI to do the conversion.

The problem is that the Cell only supports Strings, Numbers and formulas, and our data structure supports images. Is there a way to add images to 开发者_高级运维cells?


There is no images cells in Excel,you need to add the images to the worksheet.

HSSFWorkbook workbook;        
workbook.addPicture(pngData, HSSFWorkbook.PICTURE_TYPE_PNG);
0

精彩评论

暂无评论...
验证码 换一张
取 消