Bug 53309 - Adding image to header
Summary: Adding image to header
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
: 58422 (view as bug list)
Depends on:
Reported: 2012-05-28 08:18 UTC by gorillabas
Modified: 2017-03-17 01:34 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description gorillabas 2012-05-28 08:18:51 UTC
I'm trying to insert a logo image into XLSX header but so far I had no luck. This is required for my customer when I create his financial reports. In documentation of XSSFHeaderFooter class it is specified that &G is the code for "picture as background"  but I couldn't find a way to use it.
Let me know if the result of having an image in the logo can be achieved or not .Thanks!
Comment 1 Javen O'Neal 2015-10-07 10:15:06 UTC
Related open bugs:
bug 46704 - similar request for HSSFWorkbooks
bug 58422 - similar request for SXSSFWorkbooks
bug 58237 - similar request for slideshow presentations
Comment 2 Dominik Stadler 2015-10-30 18:03:52 UTC
*** Bug 58422 has been marked as a duplicate of this bug. ***
Comment 3 Greg Woolsey 2017-03-17 01:34:20 UTC
Just looked into this for a requirement.  Examining a file created by Excel 2016 with an image in the header, I see it is _still_ using a 

<legacyDrawingHF r:id="rId#"/> 

tag and related VML reference for header images, even though VML has been deprecated since the beginning of the OOXML specs.  There is only limited support for these relations in POI at the moment, and no clean way to do what this issue wants.  It will require some new XSSF code to cleanly manage the image and relations, and getting the VML right will likely be a matter of hard-coding some text and limiting the flexibility for now.

Not worth my time atm, maybe later if no one else finds it an interesting and worthwhile problem.