News for hackers. Stuff that matters.
Re:Mistaken Identifiers: Gene name errors introduced inadver... by niggler on Sunday April 21, 2013 @01:23PM (#5585510)
I posted this the last time there was a discussion about CSV and excel:

If you are generating the CSV yourself, save yourself some agony and just wrap the text in =""

    $ cat test.csv
    ="12.34567890124312341234123412341234",="1-5"
    $ open -a Microsoft\ Excel test.csv

https://news.ycombinator.com/item?id=5514587

Explanation:

It uses another auto trick: if the leading character is '=', the result is treated as a formula.

Thus, you can actually write formulas in your CSV and excel will interpret appropriately:

    $ cat test.csv
    =1+1,="1-5"
    $ open -a Microsoft\ Excel test.csv
You should see the value '2' (with content `=1+1`)

https://news.ycombinator.com/item?id=5514704

Re:Mistaken Identifiers: Gene name errors introduced inadver... by spikels on Sunday April 21, 2013 @04:48PM (#5586356)
An alternative solution that works is some situations is to format the column as "Text". However you must do this before pasting the data into the cells or else it will already be converted. I use this technique for zip codes which can have leading zeros.