Bug 80016 - Import text files with non-".csv" extention
Summary: Import text files with non-".csv" extention
Status: RESOLVED DUPLICATE of bug 78731
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.3.3 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 82764 85022 99017 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-06-14 08:33 UTC by PN
Modified: 2016-04-02 19:04 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
test case (20 bytes, text/plain)
2014-06-16 11:56 UTC, Maxim Monastirsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description PN 2014-06-14 08:33:28 UTC
As far as I can see, it is impossible to import spread sheets from a text file if the file has not a ".csv" extention.

I consider this a bug because plain text is not a format specific to LibreOffice. Enforcing a certain file name conflicts with other application which either create or use such files. 

For example, I have many hundereds of files with ".PRN" extention, (which I did not choose and which I need to keep to work with other software), and the only way I found to open them in Calc is to create a copy with ".csv" extention.

What I wish is to be able to select *any* file, irrespective of its name and extention, and to have the text import dialog shown.
Comment 1 Luuk 2014-06-14 10:17:32 UTC
if you select 'File/Open' 
and you select a '.txt' or a '.prn' file.
The Text Import wizard is shown.
Comment 2 PN 2014-06-14 10:45:56 UTC
This is not true, at least in my installation.

If I select File->Open, and then chose e.g. the .prn file, it is opened in Writer instead of Calc.
Comment 3 Luuk 2014-06-14 11:15:10 UTC
I think the .prn file is 'recognized' by LO as a doc, which should not happen if it only contains text.

If i rename an odt-file (Writer) to have the extension .prn, than it is also openend by Writer, but a testfile i created meself (with Notepad), opens in Calc.


Is it possible to attach the .prn file here?
Comment 4 Maxim Monastirsky 2014-06-15 08:29:33 UTC
(In reply to comment #2)
> If I select File->Open, and then chose e.g. the .prn file, it is opened in
> Writer instead of Calc.
Even if you do it from inside Calc?
Comment 5 PN 2014-06-15 17:53:35 UTC
Yes, it happens even if I open the file directly from calc. This is in fact
the part that I consider a problem, since opening a file from a specific
application should not open it in another application, I believe.

After some more testing to create a minimal example, I figured out that the
file contained a single latin-1 diacritical character (0x81), in a text
field, between quotes. Replacing this byte with a regular ASCII code using
a hex editor leads to the expected behaviour.

I guess UTF8 was expected so that the file seemed "binary", but even then
I'd prefer to have the file opened in Calc with this character looking
"silly" than having it opened in Writer (Writer, BTW, simply removes the
"ΓΌ").


On Sun, Jun 15, 2014 at 10:29 AM, <bugzilla-daemon@freedesktop.org> wrote:

>  Maxim Monastirsky <momonasmon@gmail.com> changed bug 80016
> <https://bugs.freedesktop.org/show_bug.cgi?id=80016>
>  What Removed Added  CC   momonasmon@gmail.com
>
>  *Comment # 4 <https://bugs.freedesktop.org/show_bug.cgi?id=80016#c4> on
> bug 80016 <https://bugs.freedesktop.org/show_bug.cgi?id=80016> from Maxim
> Monastirsky <momonasmon@gmail.com> *
>
> (In reply to comment #2 <https://bugs.freedesktop.org/show_bug.cgi?id=80016#c2>)> If I select File->Open, and then chose e.g. the .prn file, it is opened in
> > Writer instead of Calc.
> Even if you do it from inside Calc?
>
>  ------------------------------
> You are receiving this mail because:
>
>    - You reported the bug.
>
>
Comment 6 Maxim Monastirsky 2014-06-16 11:56:30 UTC
Created attachment 101166 [details]
test case

@PN: Thanks for the info. I'm attaching a test-case for this problem.

It opens in Writer because it's detected by libwpd as a WordPerfect 1 file. See Bug 78731 for a similar issue. At Bug 78731 comment 6 there is a comment from Fridrich Strba (the developer of libwpd). It's about WordPerfect 4.2, but probably the same applies to WordPerfect 1.
Comment 7 Maxim Monastirsky 2014-07-17 12:40:03 UTC
Forgot to close this one (the reason is the same as in Bug 78731).
Comment 8 Maxim Monastirsky 2014-08-18 13:18:06 UTC
*** Bug 82764 has been marked as a duplicate of this bug. ***
Comment 9 Maxim Monastirsky 2014-10-22 08:33:18 UTC
*** Bug 85022 has been marked as a duplicate of this bug. ***
Comment 10 Urmas 2014-10-22 10:25:05 UTC
How is it 'wontfix'? Why the deeply obsolete and obscure format is allowed to completely screw data interchange people do this day?
Comment 11 Maxim Monastirsky 2015-06-17 13:08:01 UTC

*** This bug has been marked as a duplicate of bug 78731 ***
Comment 12 Maxim Monastirsky 2016-04-02 19:04:02 UTC
*** Bug 99017 has been marked as a duplicate of this bug. ***