poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aram Mirzadeh <...@mbcli.com>
Subject Re: Updating an embedded Excel file inside Word
Date Tue, 07 Dec 2010 20:29:45 GMT
On 12/7/2010 12:47 AM, Nick Burch wrote:
> On Sun, 5 Dec 2010, Aram Mirzadeh wrote:
>> I'm trying to update the values for the excel chart.   I can read the 
>> docx, get the embeded object, and read and modify the cells that I 
>> need.   My question is how do you save the embedded excel file?
> You'll get the ooxml document part for the embedded file, from which 
> you get the input stream to read it. You should be able to get an output
> stream onto the same part too, to save the changed version.

I was with you until the "output stream onto the same part".  If it's an 
inputstream for the file, how do you write it back out as the same part?

> Note that an embedded document is usually emf rendering of the 
> contents + the contents themselves. Saving the excel spreadsheet won't 
> change the image, so you might want to remove the image to force word 
> to re-generate the excel view on next load. Otherwise, you'd see the 
> old file until you clicked on the spreadsheet.

Ah, this is a good point.  I'll have to see if I can figure out how to 
do this after updating the embedded file.


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

View raw message