Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Updating excel spreadsheet

Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Posts: 43011
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Story like this gets better after being told a few times. Or maybe it's just a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!