Issue 72264 - Wrong columns when import csv file in OOBase
Summary: Wrong columns when import csv file in OOBase
Status: CLOSED DUPLICATE of issue 69965
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 2.0.4
Hardware: All All
: P2 Trivial with 7 votes (vote)
Target Milestone: OOo 2.x
Assignee: ocke.janssen
QA Contact: issues@dba
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-04 21:30 UTC by fchauvat
Modified: 2007-08-02 07:40 UTC (History)
3 users (show)

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


Attachments
some examples files of the problem (5.86 KB, application/octet-stream)
2006-12-04 21:33 UTC, fchauvat
no flags Details
A simple csv file (100 bytes, text/plain)
2007-01-26 15:33 UTC, allart
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description fchauvat 2006-12-04 21:30:51 UTC
Hi, 

French 2.0.4 version of OOo with french local settings ( comma as decimal
separator).

Seems there's some problems with .csv file in Database module ( semi colon
separator, text values double quoted - but other parameters like comma separated
values and no text delimiter seems to have the same problem).

If all the column are text column, ( or consider as text with double quoted)
.... is ok.

If there's a numeric column (no double quotes), even with integer value, the
text column before the numeric one will be consider as numeric, so text values
are remplace by O.

If there's a date column ( no double quotes), the text value in the column
before the date will be empty ( or null I don't know).

If all the columns (even numeric or date one's) are double quoted ... all is ok
. But if you open the csv file with calc.... you have to reformat numeric column
as text otherwise they will be saved again as numeric .....

If the numeric column as a decimal value it seems to be ok  ( regardless to
decimal separator dot or comma).

Really strange behaviour .....

I will send you some little csv files as attachement 
Also discuss in http://www.oooforum.org/forum/viewtopic.phtml?p=193371
Comment 1 fchauvat 2006-12-04 21:33:12 UTC
Created attachment 41123 [details]
some examples files of the problem
Comment 2 fchauvat 2007-01-17 21:05:54 UTC
Hello,

Another strange thing about csv import into Base .... If in the first line( or
second if the first is column header) there is a integer number with 4 digits or
more ... the column will be detected as varchar ....
Comment 3 allart 2007-01-26 15:30:00 UTC
Hi,

I can confirm with bug.

If a numeric column follows a string column, the text of the string column is
replaced by 0. But the type of the string column is correctly detected as varchar.
If the string column is followed by a date column, the text of the string column
is replaced by nothing.

It's surprising that this issue is not yet confirmed (?); I attach ou very
simple csv file as example.

field delimiter: tabs
string delimiter: nothing

best regards

Ph.
Comment 4 allart 2007-01-26 15:33:20 UTC
Created attachment 42493 [details]
A simple csv file
Comment 5 fchauvat 2007-01-29 16:10:28 UTC
Bug always present in version 2.1 french Win XP....

Oh yes .... another funny thing .... 
The date format yyyy-mm-dd seems to be well recognize.... But always same
problem with a varchar column before date colum .... value is empty. And if the
column before date column contains integer value .... this value is decrease by
to 2 unit ( 4 becomes 2,  5 becomes 3 etc....).
Comment 6 marc.neumann 2007-03-16 14:08:45 UTC
Hi,

I can reproduce this.

set target and reassign to the right developer.

Bye Marc
Comment 7 manens 2007-07-02 15:13:42 UTC
Hi,

With this issue, it is not possible to use CSV as a datasource...

This worked before 2.0.4, can we revert changes on csv import ?

I want to mailmerge a file with data from a csv file, is there a work around ?


I think that this issue is a duplicate of Issue 69965 : 
http://qa.openoffice.org/issues/show_bug.cgi?id=69965
Comment 8 manens 2007-07-02 15:20:18 UTC
Take a look at Issue 76645 too.
Comment 9 allart 2007-07-02 15:24:02 UTC
Hi,

the only workaround I found is to open the CSV as a sheet, to save it, and to
use the .ods as the datasource. Doing so, you can specify the column's formats.

Regards,

Ph.

--
Comment 10 manens 2007-07-02 15:28:59 UTC
and Issue 70206, sorry for multiple post.
Comment 11 ocke.janssen 2007-08-02 07:40:17 UTC
It's a duplicate.

*** This issue has been marked as a duplicate of 69965 ***
Comment 12 ocke.janssen 2007-08-02 07:40:51 UTC
Closing it now.