Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I open a CSV exported from sqlite, excel erases the zeros which are codes. How can I keep the leading zeros?

share|improve this question

migrated from stackoverflow.com Aug 18 '12 at 13:25

This question came from our site for professional and enthusiast programmers.

1  
Well, that sucks. –  H2CO3 Aug 18 '12 at 12:47

1 Answer 1

up vote 2 down vote accepted

Import the column as Text or change the format to display the number. Reminder, the 0 at the left of number are not part of the number so 0001 is the number 1. If in your application 0001 is different from 1 then you are dealing with strings (or text) not numbers ...

share|improve this answer
    
If they can control the format of the CSV they could precede their text field with a '. it will automatically be interpreted as text upon import. –  Brad Aug 20 '12 at 18:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.