- Code: Select all
List<Relationship> rsp = chart.getRelationshipsPart().getRelationships().getRelationship();
for (Relationship rs : rsp) {
if (rs.getType().equals(Namespaces.EMBEDDED_PKG)) {
excelFilename = rs.getTarget();
break;
}
}
the code returns "../embeddings/Microsoft_Excel_Worksheet1.xlsx" as pathname.
However, the partname needed to open this file needs to be "/word/embeddings/Microsoft_Excel_Worksheet1.xlsx"
Can I safely replace the 2 dots by "/word" ?