Avoid read-only opening of csv files

Discuss the spreadsheet application
Post Reply
DonRonaldo
Posts: 4
Joined: Mon Mar 16, 2009 1:00 pm

Avoid read-only opening of csv files

Post by DonRonaldo »

Dear forum,

how can one configure, that Calc does not always open downloaded csv files (or any column style text files) in read-only mode? This can be very annoying when opening downloaded files on a regular basis. Is there a setting anywhere, kinda like 'Open text files without read-only protection'.

Thanks a lot for any hints
Ron.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Avoid read-only opening of csv files

Post by acknak »

In general, Calc does not open such files in read-only mode.

Are you opening the files as an email attachment? How exactly are you downloading the files?

If you have a text file on your system, the best way to get that into Calc is not to File > Open the text file, but to use Insert > Sheet From File. That way, you're sure to get the data into Calc, the data will be editable even if the original file is not, and you'll be working with a bona fide spreadsheet, not a text file that only looks like a spreadsheet.
AOO4/LO5 • Linux • Fedora 23
DonRonaldo
Posts: 4
Joined: Mon Mar 16, 2009 1:00 pm

Re: Avoid read-only opening of csv files

Post by DonRonaldo »

Hi acknak,

thank you for your quick reply.
acknak wrote:In general, Calc does not open such files in read-only mode.
Unfortunately, yes, that is exactly what Calc does. I am referring to files that are downloaded via web browser (e.g. Mozilla Firefox) by using 'save target as' or suchlike functions.
acknak wrote:Are you opening the files as an email attachment? How exactly are you downloading the files?
As mentioned above, I download files via browser by using 'Save target as...' context menu. Imagine any statistic files that web reportings offer for download.
acknak wrote:If you have a text file on your system, the best way to get that into Calc is not to File > Open the text file, but to use Insert > Sheet From File. That way, you're sure to get the data into Calc, the data will be editable even if the original file is not, and you'll be working with a bona fide spreadsheet, not a text file that only looks like a spreadsheet.
Once the file is opened from the local harddisc, the problem does not exist. This just happens when files aare opened automatically by the the download application from the systems temp folder. B.t.w. it does not seem to be a system setting thing. Other spreadsheet software does open the same download without read-only.

Ron
OOo 3.0.X on Ms Windows XP
User avatar
Hagar Delest
Moderator
Posts: 32657
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Avoid read-only opening of csv files

Post by Hagar Delest »

Do you mean that if you save as and give your document folder for example it works fine (no restriction)? And if you open it directly by the dialog asking in your web browser you get that restriction?

I've experienced that also (especially with the attachments here). In fact I live with that because when you open a file from the temporary folder, you can easily modify it, save it. But then, it may be wiped out when the temporary folder is cleaned afterwards. That's why it makes sense to save the file first in a known and standard folder before editing it. Many users here have lost data in former versions because they had edited an attachment in a mail and then lost that temporary file at the moment they had closed their mail client.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Avoid read-only opening of csv files

Post by acknak »

I'm sorry, I'm afraid I still don't understand what's happening.

I use "Save Link Target" from my Firefox browser constantly and I never have any trouble editing the files.

Further, with "Save Link Target", the browser does not open the saved file, it merely saves it to the browser's download folder. I start OOo and use File > Open, and edit the file with no problem.

What web browser are you using?

Did you try using Insert > Sheet From File? That's the better way to proceed in any case--at least that's my opinion--and it should completely avoid any "read-only" situation.
AOO4/LO5 • Linux • Fedora 23
User avatar
Hagar Delest
Moderator
Posts: 32657
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Avoid read-only opening of csv files

Post by Hagar Delest »

Will make screenshots tomorrow on my W2k system because I've never been able to get the same dialog on a GNU/Linux system. Under Windows I have a window asking if I want to open the file with a specific application or to save it somewhere. And if I open it from that dialog, it's in read-only mode.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
DonRonaldo
Posts: 4
Joined: Mon Mar 16, 2009 1:00 pm

Re: Avoid read-only opening of csv files

Post by DonRonaldo »

Hagar de l'Est wrote:Do you mean that if you save as and give your document folder for example it works fine (no restriction)? And if you open it directly by the dialog asking in your web browser you get that restriction? ...
Under Windows I have a window asking if I want to open the file with a specific application or to save it somewhere. And if I open it from that dialog, it's in read-only mode.
Yepp, that's exactly what I experience, too.
Hagar de l'Est wrote:I've experienced that also (especially with the attachments here). In fact I live with that because when you open a file from the temporary folder, you can easily modify it, save it. But then, it may be wiped out when the temporary folder is cleaned afterwards. That's why it makes sense to save the file first in a known and standard folder before editing it. Many users here have lost data in former versions because they had edited an attachment in a mail and then lost that temporary file at the moment they had closed their mail client.
Hm, well, it depends. To me this "feature" is just annoying. IF I want to save the file, I do so and save in in any folder of my choice (which is different from the temp folder). However, very often I just want to do some sorting of a column or so. There's not always a need to really save and keep the file...

Ron.
OOo 3.0.X on Ms Windows XP
User avatar
Hagar Delest
Moderator
Posts: 32657
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Avoid read-only opening of csv files

Post by Hagar Delest »

DonRonaldo wrote:However, very often I just want to do some sorting of a column or so. There's not always a need to really save and keep the file...
Indeed. I see.

For acknak, here is the dialog under W2k:
Firefox download.png
Firefox download.png (6.99 KiB) Viewed 14339 times
If I select Open with (Ouvrir avec), I get the file as read-only. If I save it (Enregistrer le fichier), no problem.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Avoid read-only opening of csv files

Post by acknak »

Ok, I've got it now. I see exactly the same thing if I simply click on a link to a document.

But if I right-click and choose "Save Link As", I never get that: I only get a file dialog for saving the linked document.

You know, now that I think about it, it makes sense. The web is read-only. Clicking on a link to a web page does not let you edit the web page, so why should clicking a link to a document let you edit the document?

If you have a read-only document in OOo, you can edit it at any time by clicking the "Edit File" button on the toolbar.
AOO4/LO5 • Linux • Fedora 23
DonRonaldo
Posts: 4
Joined: Mon Mar 16, 2009 1:00 pm

Re: Avoid read-only opening of csv files

Post by DonRonaldo »

acknak wrote:You know, now that I think about it, it makes sense. The web is read-only. Clicking on a link to a web page does not let you edit the web page, so why should clicking a link to a document let you edit the document? If you have a read-only document in OOo, you can edit it at any time by clicking the "Edit File" button on the toolbar.
hm, that's a pitty. Comparing such a dowloaded file with a web page is not really the point. If I use the "open file with" function, I expect to open an instance or copy of the original file and be able to work with it. If I save it afterwards, I should be asked where to save and how to name the file in my system. To sum it up, I consider the actual behaviour of Calc in that situation a bug rather than a feature.

acknak: Your "Edit File button" hint could be a work-around 'though, but I encourage Calc developers to overthink the matter at all.
OOo 3.0.X on Ms Windows XP
User avatar
Hagar Delest
Moderator
Posts: 32657
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Avoid read-only opening of csv files

Post by Hagar Delest »

DonRonaldo wrote:If I use the "open file with" function, I expect to open an instance or copy of the original file and be able to work with it. If I save it afterwards, I should be asked where to save and how to name the file in my system. To sum it up, I consider the actual behaviour of Calc in that situation a bug rather than a feature.
It's not a bug, it's by design. And that's exactly what you're asking for. Open the downloaded file and save it. Then OOo will ask you where it has to be saved because it is read only. If you want to edit the file first, you've to click the edit button, that's all.
DonRonaldo wrote:I encourage Calc developers to overthink the matter at all.
-> [Tutorial] Reporting bugs or suggestions. I'm not suggesting it's a bug, I just tell you how to contact the devs. Be prepared to see your report be closed as WONTFIX or something else than DEFECT.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Avoid read-only opening of csv files

Post by acknak »

If I use the "open file with" function, I expect to open an instance or copy of the original file and be able to work with it. If I save it afterwards, I should be asked where to save and how to name the file in my system.
I can see your point. That would probably be less surprising to many users, who may be unfamiliar with the "read-only" state and confuse it with some kind of error.

OTOH, OOo is consistent: if you open a document from any location that can't be written to (for saving the file), then you get a read-only document. E.g., opening a file that's on a CD, or from an email attachment.

Once the user is familiar with it, the read-only state reminds the user to take care of the problem right away and pick a location for saving the file. If all I want to do is read it, then I actually prefer the read-only view.
AOO4/LO5 • Linux • Fedora 23
gmoller
Posts: 5
Joined: Sun Sep 06, 2009 10:32 pm

Re: Avoid read-only opening of csv files

Post by gmoller »

Why would one want to open document in "Write" mode?
I know I want to for the following reason.

I'm teaching OpenOffice over the Web (Using Blackboard Learning System). The students turn in their documents (.odt and .ods) over the Web. When I grade their assignments I have to be able to see which methods they are using in their documents. In read-only mode I can't see anything. (the student could use the spacebar to right align text with out me noticing).
So I'm forced to save their documents just to be able to check their methods. If the documents would open in "Write" mode with the Save option disabled (forced save as) it would be great. (Thats exactly how it's done in MSOffice and other applications).
Well its an old thread and probably no one will read this, but I just had to say this :D

Have a nice day, and happy OOoing
Gunni
OpenOffice 3.0 on Ubuntu 9.04
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Avoid read-only opening of csv files

Post by Villeroy »

All this has nothing to do with OOo. You click a link in your browser in order to view some internet content in an external program other than the browser. The browser creates a temporary copy in a temporary directory in order to show you the internet content without write access.
If you could edit that file, you propably would not know where your browser had saved this and you could not find the file anyway. When restarting the system, any decent operating system deletes temporary files.
When you choose to download and store your own copy you will be the owner of the file, it won't be stored in a temporary directory and you are free to edit the file with any suitable program including this one. Same when you save your own copy of the viewed file.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Avoid read-only opening of csv files

Post by acknak »

I agree that OOo's "read only" mode is too restricted. However, ...
... I'm forced to save their documents just to be able to check their methods.
You do not have to save the document. All you have to do is click the "Edit File" button and confirm that you want to work on a local copy of the document. Whether you go on to save the file is up to you; you can close and discard changes and you'll not have any local copy of the document.
AOO4/LO5 • Linux • Fedora 23
Post Reply