Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

13
  • 7
    I got correct leading zeroes after adding \t to my separation character ; ... damn you MS Office, why did this have to take me more than 2 minutes to figure out? Commented May 4, 2015 at 12:39
  • 2
    Adding \t at the end of all values does indeed the trick. It's a hacky workaround, but in practice it works fine. I prefer this to the formula trick with the equal '=', because the former might be difficult to work with in other tools. Commented Feb 24, 2016 at 8:52
  • 3
    There are not enough upvotes that can express my gratitude for you. Search and replace in notepad++ ',' to '\t,\t' (to accommodate for first and last columns as well) works like a charm. Thanks. Commented Apr 11, 2016 at 11:40
  • 1
    In my MySQL query (for CSV output through PHP), I used CONCAT('\t', column_name). Also did the trick. Thanks! Commented Jun 24, 2016 at 14:39
  • 1
    CSV's are not small and easy to generate when working on files with almost a million rows. Just say'n... For CSV files I wish Microsoft would just get off their a$$ and fix this. They shouldn't try to assume what we want, and should at least ask before applying a format other than text for a known text file type. Or, at the bare minimum give us the original value back if you change the format back to text. I mean, isn't that the logical approach? But thank you for your answer, it helped. Commented Nov 2, 2017 at 0:20