private void setWorksheetPartCommitted() throws InvalidFormatException { for (RelationPart part : getRelationParts()) { if (POIXMLDocument.PACK_OBJECT_REL_TYPE.equals(part.getRelationship().getRelationshipType())) { part.getDocumentPart().setCommited(true); break; } } }
/** * this method is used to get worksheet part if call is from saveworkbook * method then check isCommitted isCommitted variable shows that we are * writing xssfworkbook object into output stream of embedded part * * @return returns the packagepart of embedded file * @throws InvalidFormatException * @since POI 4.0.0 */ private PackagePart getWorksheetPart() throws InvalidFormatException { for (RelationPart part : getRelationParts()) { if (POIXMLDocument.PACK_OBJECT_REL_TYPE.equals(part.getRelationship().getRelationshipType())) { return getTargetPart(part.getRelationship()); } } return null; }
private void setWorksheetPartCommitted() throws InvalidFormatException { for (RelationPart part : getRelationParts()) { if (POIXMLDocument.PACK_OBJECT_REL_TYPE.equals(part.getRelationship().getRelationshipType())) { part.getDocumentPart().setCommited(true); break; } } }
/** * this method is used to get worksheet part if call is from saveworkbook * method then check isCommitted isCommitted variable shows that we are * writing xssfworkbook object into output stream of embedded part * * @return returns the packagepart of embedded file * @throws InvalidFormatException * @since POI 4.0.0 */ private PackagePart getWorksheetPart() throws InvalidFormatException { for (RelationPart part : getRelationParts()) { if (POIXMLDocument.PACK_OBJECT_REL_TYPE.equals(part.getRelationship().getRelationshipType())) { return getTargetPart(part.getRelationship()); } } return null; }