Hi, I don't know much about all this, but XSSFRelation seems to contain constants for a number of types, one of them HYPERLINK, so it seems you can use something like:
drawing.addRelation(rel.getId(), XSLFRelation.HYPERLINK, new POIXMLDocumentPart()); Dominik. On Wed, Mar 1, 2017 at 3:49 PM, Daniel Küppers <dan...@tetralog.com> wrote: > Hi, > before apache poi 3.14-Beta1 i used to connect a picture with a hyperlink > over the XSSFDrawing.addRelation() method. > Example: > XSSFDrawing drawing = row.getSheet().createDrawingPatriarch(); > PackageRelationship rel = drawing.getPackagePart().addRelationship( > new URI(myWebsiteTarget), TargetMode.EXTERNAL, " > http://schemas.openxmlformats.org/officeDocument/2006/relat > ionships/hyperlink"); > *drawing.addRelation(rel.getId(), new POIXMLDocumentPart());* > CTPictureNonVisual nvPicPr = picture.getCTPicture().getNvPicPr(); > CTHyperlink hLinkClick = nvPicPr.getCNvPr().addNewHlinkClick(); > hLinkClick.setId(rel.getId()); > > however, since 3.14-Beta1, it is required to submit a POIXMLRelation zu > the addRelation()-method. > How is it supposed to aquire this? Does anyone else overcome this change? > I couldn't find something related in the patchnotes either. > > kind regards, Daniel >