File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Updating excel spreadsheet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Updating excel spreadsheet" Watch "Updating excel spreadsheet" New topic

Updating excel spreadsheet

nick angel
Ranch Hand

Joined: Dec 14, 2005
Posts: 39
Hello to everyone.I have been successful in modifying the data in an spreadsheet. I was able to continue modifying the same spreadsheet whil eit is open. The code (although I am sure not the most efficient) that I have written is the following:

The problem I am having is that while the spreadsheet is open and changes are being made, I cannot see them on the spreadsheet as they occur in "real-time". Is there any way this can be achieved? Any help would be greatly appreciated. Thank you in advance.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
My gut feeling is that that's not possible. Excel opens a file, reads it, closes it and displays it. If you were to make a small change in Excel and save it, the changes made by POI would be lost. It's only because Excel is no longer looking at the file that POI is able to change it; otherwise the file would be locked for write operations.
I agree. Here's the link:
subject: Updating excel spreadsheet
It's not a secret anymore!