List Info

Thread: BASE text-importfilter




BASE text-importfilter
user name
2007-05-02 11:18:56
Hallo,

Needs some information about how the columns from a
text-database are 
defined when linking to a csv file

until OO 1.  the text-importfilter  whas looking at row 2  
and  gives 
evry column a format  coresponding to the  caharacters where
been found 
in the csv file

                   "aaaa"  becames  text
                   "0.00"    becames decimale with
2 digits after the comma.
                   "00/00/0000"  becames a date 
etc..

with 002.0  this behaviour is changed and all colums endup
as "text"

is this a bug our is their a other way to define  a format
for a column ?

thanks for any hint

Fernand


               

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org


Re: BASE text-importfilter
user name
2007-05-07 03:20:47
Hi Fernand,

>> Huh? The extension should be *completely*
irrelevant to this, at least
>> this is how it was designed years ago. Are you
saying that if you rename
>> the .csv to .txt, then the whole thing stops
working?
>>   
> not entirely stopping, but a other behaviour at least
> 
> for ..cvs   I found     that  "aaaa"  makes 
"text"
>                                          "10"
      makes   "number"
>                                          
"01/01/01   makes  "date"
> 
> for   .txt  i found    that    "aaaa" 
ensures that all data is 
> converted to "text " and without
"aaa" some numbers and dates are corupted
>                                         "10" 
    makes "text" or 
> corupted data
>                                         
"01/01/01"  makes "text"   or 
> corupted data

Hmm - surprising. Do you mind submitting an issue, with a
sample file
attached?

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer        
frank.schoenheitsun.com -
- Sun Microsystems                      http://www.sun.com/star
office -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org


Re: BASE text-importfilter
user name
2007-05-07 12:06:09
Frank Schönheit - Sun Microsystems Germany wrote:
> Hi Fernand,
>
>   
>>> Huh? The extension should be *completely*
irrelevant to this, at least
>>> this is how it was designed years ago. Are you
saying that if you rename
>>> the .csv to .txt, then the whole thing stops
working?
>>>   
>>>       
>> not entirely stopping, but a other behaviour at
least
>>
>> for ..cvs   I found     that  "aaaa" 
makes  "text"
>>                                         
"10"       makes   "number"
>>                                          
"01/01/01   makes  "date"
>>
>> for   .txt  i found    that    "aaaa" 
ensures that all data is 
>> converted to "text " and without
"aaa" some numbers and dates are corupted
>>                                        
"10"      makes "text" or 
>> corupted data
>>                                         
"01/01/01"  makes "text"   or 
>> corupted data
>>     
>
> Hmm - surprising. Do you mind submitting an issue, with
a sample file
> attached?
>   
Frank,
Sorry, i could not reproduce the faulty formating,the
behavior is the 
same for the different extensions. I suppose
i did some testing 
without closing OO and the column formating is not always
refreshed 
when  connecting to a different text file.
That was  the good news, now the bad:during my new testings
i found some 
strange behaviors ( text who is disappearing in a colum
before a 
date-formated column, wrong number formats.... )but please
before I 
submit a issue give me some information how the 2de row is
interpreted 
by the filter.All the faulty behavior can come from the way
I formated 
this 2de row.
the only fact I can am sure off  is that  "aaa" 
gives a text-formated 
field, the rest is guesing....

Fernand


> Ciao
> Frank
>
>   

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org


Re: BASE text-importfilter
user name
2007-05-09 04:20:24
Hi Fernand,

side note: This mail is cc'ed to usersdba.openoffice.org, where
it fits
better than devapi. If you don't mind, I'd like to
continue the
discussion there, since more Base-interested users read
there.

> That was  the good news, now the bad:during my new
testings i found some 
> strange behaviors ( text who is disappearing in a colum
before a 
> date-formated column, wrong number formats.... ) but
please before I 
> submit a issue

http://www.openoffice.org/issues/bugl
ist.cgi?Submit+query=Submit+query&issue_type=DEFECT&
issue_type=ENHANCEMENT&issue_type=FEATURE&issue_type
=PATCH&component=Database+access&issue_status=UNCONF
IRMED&issue_status=NEW&issue_status=STARTED&issu
e_status=REOPENED&issue_status=RESOLVED&email1=&
emailtype1=exact&emailassigned_to1=1&email2=&ema
iltype2=exact&emailreporter2=1&issueidtype=include&a
mp;issue_id=&changedin=&votes=&chfieldfrom=&
chfieldto=&chfieldvalue=&short_desc=csv&short_de
sc_type=allwords&long_desc=&long_desc_type=allwords&
amp;issue_file_loc=&issue_file_loc_type=fulltext&sta
tus_whiteboard=&status_whiteboard_type=fulltext&keyw
ords=&keywords_type=anytokens&field0-0-0=noop&ty
pe0-0-0=noop&value0-0-0=&cmdtype=doit&namedcmd=d
ba9&newqueryname=&order=%27%27
gives you a list of known issues with CSV files, may be the
ones you
encountered are already knwon ...

> give me some information how the 2de row is interpreted

> by the filter. All the faulty behavior can come from
the way I formated 
> this 2de row.

That's a combination of magic, moon phase, and user name
...
Just kidding, of course it's the computer name, not the user
name ...

Ehm, Roughly:

The line is split into chunks, as indicated by the field
separator. One
chunk assembles one column

If a chunk is empty, a string column is assumed. If a chunk
contains
only numbers and decimal and thousand separators (if they're
set, and
one at most), the column is considered to be numeric.

Otherwise, a number formatter (that's basically the
component which in
Calc is responsible for displaying your numbers in all the
different
formats, and interpreting input you do in a cell) is asked
whether it
can detect any known date/time/datetime format in the chunk.
For
instance, 2007-12-01 would/should be recognized as date.

Especially the last part with the dates might be tricky, I'm
not
actually sure which locale is used here - probably the
system locale.



In any case, I suggest you submit an issue for your problem,
if you
don't find it in the above list. Whether they denote a bug
or a request
for enhancement can then still be decided.
Things like file content which is not shown at all
definitely sounds
like a bug. (Well, except the "known" cases where
the second row
contains a numeric value, but later rows contain strings in
the same
column. This is conceptually impossible to deal with.)

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer        
frank.schoenheitsun.com -
- Sun Microsystems                      http://www.sun.com/star
office -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )