On 12/12/2010 11:26 PM, Nick Burch wrote:
On Fri, 10 Dec 2010, Mark Beardsley wrote:
No, that does not seem to work for me. The result is that the workbook in
the embeddings folder is actually empty or blank following the write
operation and using the OutputStream obtained from the PackagePart object.

Hmm. That ought to work. Any chance you could knock up a unit test for that when you get a minute?

Also, deleting the .emf does not cause Word to update the image when the document is subsequently opened.

Maybe you need to delete the image section from within the word stream, as well as zapping the .emf itself. (I'm going on what was suggested by someone a month or two back)

Nick

Just to be clearn, Mark's method is different than what I am doing.

Mark is --- Unzipping docx on the filesystem, opening the xls embedded file as a File in POI, and re-assemblying the original docx from the resulting files. Mine method, I'm opening the docx withing POI streams and opening the embedded streams and trying to write only that porition back.

I'm going to use his method to do what I need to get done which is due today, but I think my method is the cleaner more portable way of doing it.

Aram

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

Reply via email to