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!
Related open bugs: bug 46704 - similar request for HSSFWorkbooks bug 58422 - similar request for SXSSFWorkbooks bug 58237 - similar request for slideshow presentations
*** Bug 58422 has been marked as a duplicate of this bug. ***
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.