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.

Aram

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

Reply via email to