Apache OpenOffice (AOO) Bugzilla – Issue 97937
CSV import with text delimiter should import as text
Last modified: 2013-01-29 21:42:53 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 exporters. 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.
I'm not sure, whether this is an enhancement. Treating the content between text delimiters as number, is a bug for me.