• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
supriya riya
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • 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.
 
Rodion Gork
Ranch Hand
Posts: 47
1
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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....
 
Tony Docherty
Saloon Keeper
Posts: 3142
72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for posting the solution.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!