Our CSV file has a column with numbers are matched the pattern: /^00\d{6}$/ After open this file, Calc treat this column as a number. All zero in the front are removed. Even I change the column data type to 'text'. They are not come back.
Hello Buck, Thank you for filing the bug. Please send us a sample document, as this makes it easier for us to verify the bug. I have set the bug's status to 'NEEDINFO', so please do change it back to 'UNCONFIRMED' once you have attached a document. (Please note that the attachment will be public, remove any sensitive information before attaching it.) How can I eliminate confidential data from a sample document? https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F Thank you
Created attachment 116425 [details] zero missing sample This is a sample. Column 2 'Code', heading zeros will be removed and it seems no way to get back.
Comment on attachment 116425 [details] zero missing sample CSV file Pile is the separator
@Buck : not it will solve your porblem, but this ia also the default behaviour in current versions of Excel
I wanna know if we can have a config about this. Default cell data type can be 'text'. I have to treat a large amount of CSV files. This is agony for me.
Confirming that Version: 4.4.3.2 Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16 Locale : fr_ opens the attached file and, on specifying the pipe character as the separator, then removes the leading zeroes on final import. These zeroes are however visible during the CSV import wizard preview. OSX 10.10.3
During operate the wizard. There is an option to select the data type for each column. But I think there is no multi-column select. If my file is over 100 columns. It will cost very long time to set each column to 'text'.
I think I found the solution. In preview wizard, select the first column. Then scroll to the right end, and press down <Shift> and select the last column. It will cover all columns. Even I need to scroll for a while, it's efficient enough. PS: If we can have a global config will be better.
Created attachment 116450 [details] Screenshot import window. Win7x64 5.0.0.0.beta2 Works for me using the pipe as separator and set up the second column as text, selecting the head column and selecting text in column type.