GNOME Bugzilla – Bug 777543
Import of CSV Files Treats Text as Numeric, Doesn't Respect Dialog Settings
Last modified: 2017-01-23 19:39:43 UTC
Created attachment 343918 [details] A test file with four columns showing the behavior for each combination of single and double quotes. When using "Data -> Import Data... -> Import Text File..." I can do the following: - Select the CSV file - Click "Forward" in the first dialog screen - Keep the defaults for comma-separated and double quotes a text indicator on the next dialog - On the third dialog, set column type to "Text" - Click Finish What I would expect to see is that those columns are imported as text cells, but instead they are imported as numeric cells. In my particular case, this means that leading zero's are removed, and a very long string of numeric digits is transformed into a float type, losing many of those digits. I understand that the CSV format is ambiguous, but I would think that if I'm supplying all the hints I can to import as text, then the program would do that. I've also seen a workaround where I can add a single apostrophe within the quoted cells in the CSV file and Gnumeric will do the right thing, but it doesn't seem that that should be necessary. In the test case I've attached, only test columns 3 and 4 succeed in importing columns as text, and they are the columns where I've edited the CSV to add the single quote before the numbers. Thanks for making a great program, which is my go-to spreadsheet for many uses!
Oops... That should be columns 2 and 4 do the right thing.
Confirmed. That really ought to work. Neither 2 nor 4 works in my view: with Text selected, you should get the single quote in the cell too.
This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution. Two different problems actually: number parsing and expression parsing were both active for text fields. I decided to not include the ' here for consistency with entry in the gui.
Thanks!