poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Burch <apa...@gagravarr.org>
Subject Re: How to get a PackagePart object from OPCPackage.
Date Tue, 18 Aug 2015 08:47:38 GMT
On Tue, 18 Aug 2015, Shiva Kumar wrote:
> I am trying to retrieve a PackagePart object from OPCPackage, I am using
> below code right now.
>
> is there any direct methods like:
>
> oPkg.getPart("/word/styles.xml");

No. Best bet is to look up the relationship that links the document to the 
style, then call PackagePart.getRelatedPart(relation). The OPC way is 
generally to do things by the relations, not by absolute names

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message