• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Opening CSV file in ReadOnly while writing data to it

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am writing huge ammount of data in CSV file. If i open the excel file in 'Read only' or 'Notify' mode, my java program gives Exception as

java.io.IOException: The process cannot access the file because another process has locked a portion of the file

This should be case as opening excel is not locking any thing for writing.

What i am doing is some thing like this,



What should be cause for this?

Appreciate your help..
[ December 11, 2008: Message edited by: Martijn Verburg ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to the subject you gave this post, the file is being written to as you're trying to open it. Not all applications and/or file systems can handle that.

If you really need to open it while it's being written, make a copy of it.
 
reply
    Bookmark Topic Watch Topic
  • New Topic