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.

I have a csv file that contains cells such as "+1.8882789780". When viewed in Excel, it loses the last digit possibly due to excel truncation.

Is there a way to either change the setting in Excel to prevent this from happening or change the csv file in some way?

One way is to wrap single quotes around the cell contents in addition to the double quotes.

"'+1.8882789780'"

Is there a better way?

share|improve this question
    
See: superuser.com/a/427422/76571 –  Excellll Sep 23 '12 at 14:52

1 Answer 1

Precede the quoted string with an = sign, e.g., ="+1.8882789780".

share|improve this answer
    
Note that if you're using Excel 2007, it has a bug that might require a workaround (depending on the quoted text). Read this thread for details. –  Karan Sep 22 '12 at 22:53
    
is there a way without changing the actual content? like modifying excel settings? –  user15586 Sep 22 '12 at 23:30
3  
Yes. You can also select the cells of interest, right-click and select Format Cells ..., then select Text. But you'll need to do that before entering the value. Once it's been interpreted as a numeric value, the extra digits will have been lost. –  Nicole Hamilton Sep 22 '12 at 23:38
1  
Addition to the comment just above: remember that Excel can't save formatting information in csv file –  Serge Sep 23 '12 at 1:39
1  
@Serge, true, but cells formatted as Text will be saved exactly as entered and displayed. –  Excellll Sep 24 '12 at 0:16

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.