This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes POI excel rewrite file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "POI excel rewrite file" Watch "POI excel rewrite file" New topic
Author

POI excel rewrite file

zelynn goay
Ranch Hand

Joined: Jan 09, 2005
Posts: 30
Hi,

I would like to write to an existing excel file using POI. I added a clause to check if file doesn't exist, create a new excel, or if exist, create a new worksheet.
when i execute the program, i can the see a new excel file being created. when i execute again, i see the file size increase . but when i open up the excel file, i couldn't see any added changes. after i close the excel file, the file size decrease.

Please help.


[ August 12, 2008: Message edited by: zelynn goay ]
[ August 12, 2008: Message edited by: zelynn goay ]
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
It's probably not a good idea to write to a file while it's still open for reading. Try closing the input file first, and then writing to it.
zelynn goay
Ranch Hand

Joined: Jan 09, 2005
Posts: 30
ok. thanks.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: POI excel rewrite file
 
It's not a secret anymore!