Bug 51345

Summary: Adding Image to EXcel Header Problem
Product: POI Reporter: shafiexp
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED DUPLICATE    
Severity: critical    
Priority: P2    
Version: 3.6-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: Adding Image to Excel Header

Description shafiexp 2011-06-09 04:54:39 UTC
Created attachment 27135 [details]
Adding Image to Excel Header

Hi,

I have creted Excel Header manually bu using MS-Excel and saved that one as template.xls

then after I opened that that template excel file by using poifsfilesystem and manipulating data and images to that template and saving entire workbook into another excel file "Header.xls"

when I open Header.xlsa file,

1. Header is there
2.data is added properly
3.but Image is not added to the workbook


Please  help me in this case.

Thanks,
Shafi
Comment 1 Yegor Kozlov 2011-06-14 11:59:06 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

*** This bug has been marked as a duplicate of bug 51287 ***