Issue 97937 - CSV import with text delimiter should import as text
Summary: CSV import with text delimiter should import as text
Alias: None
Product: Calc
Classification: Application
Component: open-import (show other issues)
Version: OOo 3.0
Hardware: Unknown All
: P3 Trivial with 3 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Keywords: oooqa
Depends on:
Reported: 2009-01-10 20:46 UTC by dpeastman
Modified: 2013-01-29 21:42 UTC (History)
2 users (show)

See Also:
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description dpeastman 2009-01-10 20:46:24 UTC
When importing a CSV file, the presence of the text delimiter should cause the 
cell to be automatically treated as text.  It is, after all, the primary purpose 
of a text delimiter to indicate that the value is text.

While it is true that you can specify that a column is text during the import 
process, this can be a real pain and error prone.  I frequently want to keep the 
file in CSV format so it can be shared with other applications -- so I may need 
to open the same CSV file in OOo many times.  Having OOo default to the correct 
handling would make this much easier.

A good example of why this important is handling of postal codes, especially US 
ZIP codes.  These codes often start with 0, and if formated as a number any 
leading 0's get dropped.  Another example is years formated as 2 digits (e.g. 
'07' for '2007') -- again, if treated as a number, the leading 0 is dropped.

It is easy to convert a column from text formating to numeric formating -- but 
it is relatively difficult to convert a numeric column back to text once the 
leading 0's have been lost. 

An alternative solution would be to treat any value with a leading 0 as text.  
This is less elegant, but might be more compatible with a broader range of CSV 

Either of these solutions probably also demands that there be an option in the 
import to explicitly format a column as numeric.  In other words, if the default behavior switches to text under any circumstances, then there needs to be a way 
to explicitly override that default.
Comment 1 Regina Henschel 2009-01-10 21:21:45 UTC
I'm not sure, whether this is an enhancement. Treating the content between text
delimiters as number, is a bug for me.