You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2011/06/08 18:21:34 UTC

DO NOT REPLY [Bug 51341] New: Adding Image to Header in Excel Using HSSF

https://issues.apache.org/bugzilla/show_bug.cgi?id=51341

             Bug #: 51341
           Summary: Adding Image to Header in Excel Using HSSF
           Product: POI
           Version: 3.7
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: critical
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: shafiexp@gmail.com
    Classification: Unclassified


Created attachment 27132
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27132
Header Image Problem

Hi,

My Requirement is insert image to header inn excel file,

As POI doesn't support for this,
I have created Image header in Template Excel File manually by using MS-Excel.

Then I opened that Excel File by using POI(POIFSFileSystem) and then after I
have Manipulated String data and Images into that existing Excel Template.

I have stored above entire workbook in another excel file.

Then when I pen that excel file,

in that file Header Image and data coming,
I'm not able to see the Image which I have inserted after opening that excel.

Please help me in this case.

Here I'm attaching that files

Thanks,
shafiulla

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 51341] Adding Image to Header in Excel Using HSSF

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51341

Yegor Kozlov <ye...@dinom.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #1 from Yegor Kozlov <ye...@dinom.ru> 2011-06-14 11:59:28 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 ***

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 51341] Adding Image to Header in Excel Using HSSF

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51341

Evgeniy Berlog <su...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |53010

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 51341] Adding Image to Header in Excel Using HSSF

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51341

Evgeniy Berlog <su...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|DUPLICATE                   |FIXED

--- Comment #2 from Evgeniy Berlog <su...@gmail.com> ---
This problem should be fixed in trunk. Anyway, you have a bug in your code. 

ClientAnchor anchor=helper.createClientAnchor();
int picIndex=wb.addPicture(img_bytes.toByteArray(),
HSSFWorkbook.PICTURE_TYPE_JPEG);
anchor.setRow1(5);
anchor.setCol1(1);
anchor.setCol2(2);
anchor.setRow2(5);

Anchor.row1 == anchor.row2 and anchor.dx1 == anchor.dx2 , so the width of your
image is equals to 0

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

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org