Issue 70206 - CSV imported fields not recognized as numbers
Summary: CSV imported fields not recognized as numbers
Status: RESOLVED FIXED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 2.0.4
Hardware: All All
: P3 Trivial with 1 vote (vote)
Target Milestone: 4.2.0
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-08 15:49 UTC by pagalmes.lists
Modified: 2016-04-03 17:00 UTC (History)
2 users (show)

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


Attachments
The CSV file showing the behaviour (118 bytes, text/plain)
2006-10-08 15:51 UTC, pagalmes.lists
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description pagalmes.lists 2006-10-08 15:49:57 UTC
When creating a database using an existing CSV file, Base does not recognizes
some fields as being numbers. The fields not recognized are :

- the negative values (ex : -63)
- the numbers containing more than 3 digits (ex : 1234)

Some explanations : It looks like Base uses the first line to determine if a
column contains "text", "doubles", "dates"... If the number is not in the
criteria (a number of less than 4 digits) it is set as text.

This behavour is annoying because if we want to link that dataBase in Calc and
do calculations on it, those fields recognised as text are not computed.

To reproduce the issue :

- Download the example file,
- create a database (text file)
- select the csv file

- double click on the table corresponding to the CSV fil
- right click to check the format of each column to check if it is text or number.
Comment 1 pagalmes.lists 2006-10-08 15:51:48 UTC
Created attachment 39638 [details]
The CSV file showing the behaviour
Comment 2 christoph.lukasiak 2006-10-10 11:57:32 UTC
clu -> pagalmes: as you have already written, in text databases, the first line
after the headder is used to define the format (this is standard in text
databases and a wanted behavior => no bug) - but i could imagine, that this
rather old definition could be improved by anything like a format engine, that
checks all values and after that define the format -> so i send this issue as a
'feature enhancement' to the requirement team
Comment 3 pagalmes.lists 2007-04-23 16:59:06 UTC
Any news?
Comment 4 vetschera 2009-05-04 14:46:58 UTC
I think this should be treated as a defect rather than a request for
enhancement. Consider the following two csv files:

File 1:

"One";"Two";"Three"
1;2;3.00
4;5;6.78
9;8;7.65

File 2:

"One";"Two";"Three"
1;-2;3.00
4;5;6.78
9;8;7.65

In file 1, column "Two" is imported as numbers, in file 2, the column "two" is
imported as text. The only difference is that the second file contains a
negative number in the first line, but it is still a number. This still happens
in 3.0.1
Comment 5 damjan 2016-04-03 17:00:47 UTC
All the examples given work in 4.2.0-dev and even 3.2.0: negative numbers and numbers with more than 3 digits are recognized as being numbers.

The bug was probably fixed between the reported version (2.0.3) and 3.2.0, so resolving fixed.