Response in-line:

With the greatest respect and no offence intended. You don't seem to
have to have a comprehensive understanding of file structures. To the
software "user" what may appear "simple" and/or "obvious" function, can
be a difficult (if not impossible) logic to code.

On Thu, 2006-11-30 at 22:38 -0500, Eric Wood wrote:
> Mathias Bauer wrote:
> > The problem of this issue: *every* text file is a "delimited" file. It
> > is (nearly?) impossible to differentiate between a "delimited" and a
> > "normal" text file. So the result would be that Calc opened nearly every
> > text file. In this case I think the current default (Writer) overall is
> > the better one.
> >   
> Not when the text file is of obvious columnar data.

Sorry,but from a coding logic point of view, there is nothing obvious
about it (see below).

> There two main standards - TAB and CSV.

Having dealt with file structures for 30+ years, I have not come across
any "official" standard for defining the separator(s) for a text
delimited file structure. A common accepted usage, yes, but not a
standard. Almost any character code can be used as the separator, or
fixed character width, which is why Calc offers the user a selection a
dialog.

>  I don't understand that "every" text file is reasonably delimited.

OK! Lets say I send you 2 files "something.txt" and "something.csv" both
contain the same one line: "The cat sat on the mat"
They are both, like almost "every" text file, _SPACE_ delimited files.

> All the loader has to do is sample the first few lines for '09' tab 
> chars or "," patterns and hand it off to calc instead of writer.

Question is how many lines? For simplicity (and my arthritis) let's say
the first 2 lines. So how does my code deal with a file containing the
following 3 lines?
                        Blah Blah[tab]First statement
                        Foo Foo[tab]Next statement
                        The above is a load of blah blah and foo foo

> Better yet, all the loader has to do is to not ignore the preference of 
> the user that wants a particular file to be loaded by the correct 
> application.

Have you set your OS preferences to open *.txt and *.csv files with
Calc? Works for me.

> This is a case where the openoffice loader to "too smart".

Maybe (see below).

> I can rename a TAB file to be a .XLS extension and Excel detects that 
> this is obvious columnar data and bring it right in - no user 
> intervention - bam!

Sorry, but Excel detects nothing, other than the ".xls" extension. Try
renaming another file type (eg. gif) to ".xls" and see what Excel makes
of it.

> Even if I made the text file extension name be .ODS, .SXC or whatever
> that the host OS has "associated", the openoffice loader shouldn't
> ignore that "junk.ods" was supposed to be loaded by Calc (by the users
> explicit purpose of association) but keeps getting handed off to
> Writer.

This is where OOo is "too smart", because it (unlike Excel) detects that
it is not in compressed Open Document format and is a text file. Agreed,
it would not be a major coding problem in this situation to offer users
an application selection a dialog. However, this would require some
additional user intervention, which you do not seem to approve of.

I hope this offers some insight into how OOo generally and Calc
specifically handles text files.

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to