• 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

Why is my code creating Read Only file, I need file to be editable.

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My problem is I am creating an folder with excel files in it, later zipping the folder.
All the excels created are Read Only user cannot edit them.
I don't want excel sheets to be read only.
Can anyone please help?






Thanks.
 
Ranch Hand
Posts: 47
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean by "Read Only"? I believe they do not have file system readonly attribute in the folder listing?

Perhaps it is when you open the file in excel itself and it shows "File is in Read Only mode - click Enable Edit"? If it is the case, you simply need to click the "enable edit" button below menu. It is just a funny feature of modern Excel - to prevent files from occasional editing.

You may upload one of your files to, say, http://expirebox.com so we can try to open it and see whether it is really read-only. Or you can open it yourself with some other tool, like LibreOffice SpreadSheet to check...
 
supriya riya
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Other Excel files created from Java code in same system are not read only particular excel files created using above code are read only.Hence user is not able to edit them as soon as they open.
Why so?Same file system different behavior.
All I want is Excel files created should not have read only permission set on them.
I am not using any cell style to lock cells either.
I even tried on sheet.


Uploading via http://expirebox.com is downloading without read only, but downloading on my system (Mac Osx 10.9.5) is giving problem, it has read only permission set to it by default.
 
supriya riya
Ranch Hand
Posts: 45
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Issue is with MAC OSX .
Found a post regarding file name and MAC OSX .My file name had "/" where there is time stamp value.
Normal file download where I/O stream accesses the excel directly removes the read only from file.But when I download a complete folder it's contents (excel files)are all have read only permission.
So I replaced "/" with "-" in file name and it works fine !
Below is link to the post
Saving files with name containg "/" on MAC


Another solution we found is the you can not use '/' in the name of your file. It will allow you to save it on your mac, where as in Windows it says you can't use the character / (backslash) however once you save it and reopen it on a mac, it will be read only....

 
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for posting the solution.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic