I am having an issue putting multiple images into a single sheet using NPOI version 2.0
This is the code I am using, and have following instructions to only use one Patriarch in the process.
IDrawing patriarch = reportSheet.CreateDrawingPatriarch();
XSSFClientAnchor clientAnchor1 = new XSSFClientAnchor(100, 50, 1714500, 33624, 1, 1, 1, 1 + 3)
AnchorType = (short)AnchorType.DontMoveAndResize
XSSFPicture picture1 =
patriarch.CreatePicture(clientAnchor1, LoadImage(Server.MapPath("/Content/logo1.png"), _reportWorkbook));
picture1.LineStyle = LineStyle.DashDotGel;
XSSFClientAnchor clientAnchor2 = new XSSFClientAnchor(100, 50, 1714500, 33624, 1, currentRow, 1, currentRow+3)
AnchorType = (short) AnchorType.DontMoveAndResize
XSSFPicture picture2 =
patriarch.CreatePicture(clientAnchor2, LoadImage(Server.MapPath("/Content/Logo2.png"), _reportWorkbook));
picture2.LineStyle = LineStyle.DashDotGel;
When I open the generated excel file, both of the images are the last image loaded. I have opened the file in microsofts "Open XML SDK 2.0 Productivity Tool" and I can see that there are two different images stored in the sheet.
If some one could shed some light on me I would really appreciate it.
(I have also posted on the NPOI Codeplex discussion board and if I get a solution from there I will share it here)