Once you close the input stream, you should be able to open and output
stream as the same file and write the document to that.

Shawn

-----Original Message-----
From: Xuemin Guan [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 9:27 AM
To: POI Users List
Subject: How to update a XLS file


Dear all, I know

1. how to create a XLS file from scratch;
2. how to duplicate a XLS;

But, I don't know how to update an existing XLS file.
I tried the following:

1. build a workbook on a InputStream;
2. update this workbook(create sheet, cell, delete sheet etc);
3. close the InputStream;

But, did not get it work.

Do I have to save the modified XLS to another temporary XLS file, then 
at last overwrite the original using the temporary one?

Any help will be highly appreciated,

Best,

Xuemin


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to