Bug 51287

Summary: Is it possible to add a new image to the existing excel template which have images already with xssfworkbook
Product: POI Reporter: shafiexp
Component: XSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: critical    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Bug Depends on:    
Bug Blocks: 53010    

Description shafiexp 2011-05-29 07:34:00 UTC
Hi,


I'm opening the existing excel file template which have images already and adding new image to that file using hssfworbook.

In this case The previous images are corrupted..

I have seen some where this is possible by using xssfworkbook.


what are the changes we have to do in this case.

Is by default xssfworkbook support for my case
Comment 1 Yegor Kozlov 2011-05-29 08:51:49 UTC
It is a limitation of HSSF - it can create drawings from scratch, but cannot modify existing ones. This means that if you add an image to a sheet that already has graphic objects then the existing graphic objects are invalidated. 

XSSF does not have this limitation and should work fine for you. Convert your template in the .xlsx format and you will be good.

P.S. Please post usage questions to the poi-user list. Bugzilla is for submitting bugs.

Yegor
Comment 2 Yegor Kozlov 2011-06-14 11:59:06 UTC
*** Bug 51345 has been marked as a duplicate of this bug. ***
Comment 3 Yegor Kozlov 2011-06-14 11:59:28 UTC
*** Bug 51341 has been marked as a duplicate of this bug. ***
Comment 4 Evgeniy Berlog 2012-08-12 11:52:26 UTC
This problem should be fixed in trunk.

Please try with a nightly build - see download links on http://poi.apache.org/
or build yourself from SVN trunk, see http://poi.apache.org/subversion.html