Issue 49828 - Unable to import text files into Calc
Summary: Unable to import text files into Calc
Status: CLOSED IRREPRODUCIBLE
Alias: None
Product: Calc
Classification: Application
Component: open-import (show other issues)
Version: 680m99
Hardware: All All
: P2 Trivial with 1 vote (vote)
Target Milestone: ---
Assignee: spreadsheet
QA Contact: issues@sc
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2005-05-25 07:30 UTC by chrishk
Modified: 2010-11-11 20:28 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Fixed-Width # Delimited File (No Extension) (451 bytes, text/plain)
2005-05-25 10:55 UTC, chrishk
no flags Details
Fixed-Width # Delimited File With NULL characters (492 bytes, text/plain)
2005-05-25 10:56 UTC, chrishk
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description chrishk 2005-05-25 07:30:14 UTC
I have made some comments in issue 34078, but I feel that these comments might
be overlooked as the issue is not a DEFECT issue. Here are the comments I made
on issue 34078:

<Comments>
Hi all,

  I have been an OpenOffice user for a while, and started with version 1.1.4. I
have downloaded the latest beta build (OpenOffice.org 1.9.100) and must say that
I am very impressed with the product. In my line of work, I continually deal
with files received from different sources which needs to be imported into our
system. The data comes in various formats and have to be "re-worked" to get it
into a format suitable to import into our system. The files we receive come in a
variety of formats including Fixed-width or a various other delimited type
files. Calc is absolutely perfect for this. However, I am unable to import any
text file properly into Calc anymore since I started using the new version.

  I searched all issues I could find and decided to post to this issue. I tried
everything to open the files but nothing works - I tried using the OpenOffice
dialogs, default system dialogs and even various options - nothing seems to
work... I will attempt to list all my methods:

1. File -> "Open"
   Select file and File Type as "Text CSV (*.csv; *.txt)"
   Select the "Open" button
   RESULT: This imports the file into Writer

2. Insert -> "Sheet..."
   Select "From File" option
   Select "Browse" button
   Select file and File Type as "Text CSV (*.csv; *.txt)"
   Select the "Insert" button
   1.1.4 RESULT: Sheet 1 appears in the box next to the "Browse" button and
                 the import dialog pops up. With this, I could still import
                 the file.
   1.9.100 RESULT: System seems to think/freeze for a few seconds and then
                   returns to "Insert -> Sheet..." dialog. Nothing happens
                   after this. You are free to close the dialog - the system
                   did not freeze, but no import dialog popped up either.

3. Insert -> "Sheet From File..."
   Select file and File Type as "Text CSV (*.csv; *.txt)"
   Select the "Insert" button
   RESULT: System seems to think/freeze for a few seconds and then
           returns to "Insert -> Sheet..." dialog. Nothing happens
           after this. You are free to close the dialog - the system
           did not freeze, but no import dialog popped up either. (Same as 2.)

4. Insert -> "Link to External Data..."
   Select the "..." button
   Select file and File Type as "Text CSV (*.csv; *.txt)"
   Select the "Insert" button
   RESULT: System seems to think/freeze for a few seconds and then returns to
           Insert -> "Link to External Data..." dialog. It did not carry the
           value of the file that was chosen, but this is a seperate issue...
   Type the fully pathed name of the file into the dialog and press the Enter key
   RESULT: System seems to think/freeze for a few seconds and then remains on
           the Insert -> "Link to External Data..." dialog.

  This is unfortunately a real problem as this is much needed functionality that
used to worked. In my humble opinion, I believe that this warrants a priorty
larger than a P3. Could this PLEASE be sorted out for the latest stable version
of OpenOffice (v2) as I am already a fan of the new look-and-feel OpenOffice and
would not want to be left behind on OpenOffice.org. 1.1.4. By the way, before I
forget, I tested the said version on a Windows XP Home Edition platform.

  Thanks to all the contributors for a great product!
</Comments>

  In addition to this, I have downloaded then latest build/release (1.9.104) and
re-tested the functionality. The results remain the same. Any idea if this will
be sorted for the final build of OpenOffice.org 2.0?
Comment 1 frank 2005-05-25 09:24:09 UTC
For now I can't reproduce without a file from you. So please attach a file which
causes these problems.

Frank
Comment 2 chrishk 2005-05-25 10:55:13 UTC
Created attachment 26542 [details]
Fixed-Width # Delimited File (No Extension)
Comment 3 chrishk 2005-05-25 10:56:41 UTC
Created attachment 26543 [details]
Fixed-Width # Delimited File With NULL characters
Comment 4 chrishk 2005-05-25 11:25:06 UTC
  I decided to produce some sample files because I am not allowed/able to supply
the files I work with. I learned a couple of things in the process...

1) If a file does not have an extension or does not have an extension OpenOffice
   recognizes, it exhibits the behaviour where it ignores you. With version
   1.1.4, a dialog used to pop up, asking you to supply a Filter - from which
   you could select "Text CSV" if you specified a file with an unknown extension
   to the import dialogs. This is the part that does not happen anymore/which is
   broken. If your file has an extension of .txt or .csv, it seems to work fine.
   This basically seems to be regressed functionality - and I am not sure if this
   is a conscious decision. I preferred the previous functionality more. I guess
   more users than not would recon like me in my first impression, that this is
   broken...

2) In the second attached file, with NULL characters, you get the same behaviour
   from the new OpenOffice - it just ignores you... With version 1.1.4, it
   imported these funny characters and the appeared as little blocks in the
   appropriate cells. This of course gave you the opportunity to delete these
   rubbish characters. Again, this used to work in version 1.1.4. Most users
   would never be able to see NULL characters in something like Notepad or normal
   text editors, nor know that they exist... Because of this, they would not
   understand why OpenOffice ignores them when they want to open a file they
   used to be able to open with 1.1.4. Is this a regression or is it intended -
   and again - I like the old functionality on this better. ;)

Once again, thanks for a lovely product!

Regards,
  Chris
Comment 5 abdul 2005-06-13 06:07:54 UTC
i am able to import text file in to calc  through Insert -->Sheet.. and  sheet
from file  option. 
pls try using  1.9.104
Comment 6 Matthias Basler 2005-06-19 11:05:32 UTC
Hi chrishk

I can't reproduce your problem. I heavily import CSV and other ascii file and I
was able to import you "TestFile1" without any problem on the first try.

What I did:
- Open OOo Calc (not Writer!)
- Selecte File->Load
- Select your File
- After that, change file type to Text CSV
  (Your file is not shown any more because it doesn't have a valid extension.
  But that doesn't matter. Just be sure the filename is still entered. )
- Click OK
- The CSV import dialog opens, you can select the format (e.g. "#" delimited)
and OOO will load the file just fine.

Tested with WinXP and OOo1.0.9.

Now to the second file. This one is indeed not accepted, presumably because of
the null characters (which are probably not allowed in CSV files). What you can
do is:
- Load this file into OOo. It will come up in OOo Writer, no matter what you do.
- Save the file as text file with a .csv extension (in order not to overwrite
the original one). This will create a text file with the null characters removed.
- Open OOo Calc and import the new file there as described above.

Hope that helps.

Please note also:
1. 
What causes you all this trouble is that your file has no extension. I would
strongly recomment giving ascii tables the ".csv" extension. This way they are
readily recognized by OOo Calc (and other software) and treated as such. Also,
your approach 3 ("Sheet From File...") will likely work then. (It does for me.)

2.
I'll close this issue. If you believe that OOo not accepting text files with
null characters as "CSV files" is a bug, please open a new bug report (priority
4 I'd say) specifically for this.

Matthias Basler
Comment 7 frank 2005-06-29 14:12:11 UTC
closed 
Comment 8 Rainer Bielefeld 2009-01-09 11:36:48 UTC
I checked with "Ooo 3.0.0 (DE) Multilingual version German UI WIN XP: [OOO300m9
(Build9358)]" and can confirm the reported effect. OOo will open
"TestFile1-broken.txt" from WIN Explorer correctly as .csv with CALC,  but it
will open the document with WRITER if you try from OOo file menu. I believe THAT
is a bug.

We have several issues concerning this or similar problems
Issue 49828 (WFM? I don' think so)
Issue 65460 (invalid?)
Issue 80393 (invalid)
Issue 93488 (might be something different with double semicolons and double quotes)
Comment 9 moctecheckva 2010-11-10 23:26:09 UTC
Created attachment 73840
Comment 10 Matthias Basler 2010-11-11 20:28:45 UTC
SPAM.