simply grab the output stream and write to it:

                OutputStream pkgStream = excelpart.getOutputStream();
                pkgStream.write(excelBytes); //  excelBytes replaces
the old contents
                pkgStream.close();

Yegor

On Wed, Feb 29, 2012 at 9:53 PM, Ashley Westwell
<[email protected]> wrote:
> Hey All
>
> So I am trying to replace an embedded excel document in a power point with
> one that I have created. What are the correct steps once I have the
> embedded document name?
>
> List<PackagePart> embeds = pptslideshow.getAllEmbedds();
> for ( PackagePart excelpart : embeds) {
>        PackagePartName name= excelpart.getPartName();
>        if (name.toString().equals(relation.getTargetURI().toString())){
>               ... ?
>               }
> }
>
> I have a file that I want to replace the embedded file in the relation
>
> Thanks
>
> -Ashley
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to