[Solved] Opening text files automatically
-
- Posts: 15
- Joined: Fri Feb 08, 2019 4:26 am
[Solved] Opening text files automatically
Hi,
When opening a text file, I always get asked ascii filter options before I can open it. Is there any way to automatically open it without that ascii filter options panel?
Thanks,
Vic
When opening a text file, I always get asked ascii filter options before I can open it. Is there any way to automatically open it without that ascii filter options panel?
Thanks,
Vic
Last edited by robleyd on Thu Aug 26, 2021 5:16 am, edited 1 time in total.
Reason: Tag [Solved]
Reason: Tag [Solved]
OpenOffice 4.1.5 on Windows 10
Re: Opening text files automatically
Are these files Office documents or they are really pure .txt files?When opening a text file, I always get asked ascii filter options before I can open it. Is there any way to automatically open it without that ascii filter options panel?
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
-
- Posts: 15
- Joined: Fri Feb 08, 2019 4:26 am
Re: Opening text files automatically
They are pure text files. I saved them as text files from Open Office.
OpenOffice 4.1.5 on Windows 10
Re: Opening text files automatically
Why?I saved them as text files from Open Office.
Whí not save the original document into the native, international standard .odf file format? (and then you can export a copy into any other format. When you want re-edit the original document, it will remember to all of the formatting properties. You can not store any formatting property, or character coding property in a pure text file. Therefore you must give the coding property for the office suite in the import filter.)
If you familiar to the macros, then you can write a subroutine for opening .txt files with predefined coding an other properties. But it is better and easier to use the native file formats.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
-
- Posts: 15
- Joined: Fri Feb 08, 2019 4:26 am
Re: Opening text files automatically
Because if I transfer the file to other folks, not everyone has odt or wants to download OO.
OpenOffice 4.1.5 on Windows 10
Re: Opening text files automatically
If they don't need to edit the file, send it as a PDF. Most modern versions (since 2007) of MS Office can read .odt format, but most MS Office users don't know that.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: Opening text files automatically
It is not a reason to store the document in pure text format - if you must reedit it.Because if I transfer the file to other folks, not everyone has odt or wants to download OO.
Otherwise:
Google docs can open the .odt.
LibreOffice can open the .odt.
Apache OpenOffice can open the .odt.
NeoOffice can open the .odt.
CollaboraOnline can open the .odt.
MS Office can open the .odt.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
- MrProgrammer
- Moderator
- Posts: 4883
- Joined: Fri Jun 04, 2010 7:57 pm
- Location: Wisconsin, USA
Re: Opening text files automatically
If my file name ends in .txt, when I use File → Open in OpenOffice the file loads into Writer immediately with no ASCII filter dialog.nichollsvi wrote:Is there any way to automatically open [a text file] without that ascii filter options panel?
If your file does not end in .txt, how do you expect OpenOffice to know that it is a text file for Writer?
If you need any additional assistance attach a document demonstrating the difficulty (remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the document itself).
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
-
- Posts: 15
- Joined: Fri Feb 08, 2019 4:26 am
Re: Opening text files automatically
Thanks. MrProgrammer that was what I had to do (file - open in OO). Thanks again everyone for your help.
OpenOffice 4.1.5 on Windows 10
Re: Opening text files automatically
This only works on my Linux system if the file uses Unix/Linux line endings (paragraph breaks). If the file uses Mac or Windows line endings, the Text Import dialog opens and the file opens in Calc!MrProgrammer wrote:If my file name ends in .txt, when I use File → Open in OpenOffice the file loads into Writer immediately with no ASCII filter dialog.
I have many old text files from Windows. To open those text files in Writer, I have to double-click the file and make sure that the correct line ending (paragraph break) is selected on the ASCII Filter Options dialog.
AOO 4.1.14 on Ubuntu MATE 22.04
- MrProgrammer
- Moderator
- Posts: 4883
- Joined: Fri Jun 04, 2010 7:57 pm
- Location: Wisconsin, USA
Re: [Solved] Opening text files automatically
Perhaps the -lf -tabs options of the tab2space command (part of the HTML Tidy Project) will be helpful. Your Linux distribution may already have this installed.Bill wrote:I have many old text files from Windows. To open those text files in Writer, I have to double-click the file and make sure that the correct line ending (paragraph break) is selected on the ASCII Filter Options dialog.
NAME
tab2space - Utility to expand tabs and ensure consistent line endings
SYNOPSIS
tab2space [options] [infile [outfile]] ...
DESCRIPTION
tab2space expands tab characters into a specific number of spaces.
It also normalizes line endings into a single format.
OPTIONS
-help or -h display this help message
-dos or -crlf set line ends to CRLF (PC-DOS/Windows - default)
-mac or -cr set line ends to CR (classic Mac OS)
-unix or -lf set line ends to LF (Unix / Mac OS X)
-tabs preserve tabs, e.g. for Makefile
-t<n> set tabs to <n> (default is 4) spaces
Or perl will do that:
# Convert DOS/Windows terminators to UNIX terminators
perl -pe 's|\r\n|\n|'
# Convert classic Mac terminators to UNIX terminators
perl -pe 's|\r|\n|'
I use MacOS and text files open immediately in Writer. It's only "classic" Mac from the previous century that used \r as a line terminator. MacOS (anything released in the last 20 years) is based on UNIX and uses \n as a delimiter:
$ hexdump -C <<EOF
> Foo
> Bar
> EOF
00000000 46 6f 6f 0a 42 61 72 0a |Foo.Bar.|
00000008
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
Re: [Solved] Opening text files automatically
I couldn't find tab2space in my distribution's repository. I did find dos2unix which converted the line endings in my text files.
AOO 4.1.14 on Ubuntu MATE 22.04
-
- Posts: 15
- Joined: Fri Feb 08, 2019 4:26 am
Re: [Solved] Opening text files automatically
I used dos2unix on Linux systems. This is on a mac.
OpenOffice 4.1.5 on Windows 10