Bug 51287 - Is it possible to add a new image to the existing excel template which have images already with xssfworkbook
Summary: Is it possible to add a new image to the existing excel template which have i...
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 critical (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
: 51345 (view as bug list)
Depends on:
Blocks: 53010
  Show dependency tree
 
Reported: 2011-05-29 07:34 UTC by shafiexp
Modified: 2012-08-12 11:52 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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