jakob / TableTool

A simple CSV editor for the Mac
MIT License
1.3k stars 92 forks source link

Leave leading 0s #84

Open kselkowitz opened 4 years ago

kselkowitz commented 4 years ago

When a column value has leading 0s (e.g. UK telephone number 03333056899) when I open it in TableTool the leading 0 is stripped out. I'd like an option to leave those as-is.

kssi commented 4 years ago

This should NOT even be an option.

CSV doesn't support data type. It stores fields as raw strings that need to be read, displayed and saved as such.

Data interpretation is a job for a fully-featured spreadsheet software, not for TableTool.

Any other behavior is broken and will just ruin the integrity of the CSV file.

This bug is critical. It's safer to use a plain text editor for the time being.

jtkiley commented 4 years ago

+1

Another common case where leading zeros matter is CUSIP identifiers. There is data encoded by position (issuer, issue, and a check digit in the 9th position), and different databases use the 6, 8, or 9 character variants. Without the leading zeros, you couldn't be sure what you were looking at (e.g., a six digit identifier that is actually an eight or nine with leading zeros removed), especially with small numbers of rows. While some can have letters (and would presumably make the column display as a string), that's not guaranteed.

rgregory1 commented 4 years ago

Agreed, I believe this is a critical error as well. I have been searching around for something EXACTLY like this tool, I thought my search was over. A quick check to make sure my leading zero's are there, no such luck.

Without this feature, I'd just use a spreadsheet and have the same results. Also without this feature, I'll only be able to use a plain text editor to ensure my data is kept unchanged by the tool...

AndrewSB commented 4 years ago

This is a duplicate of #9, this should be closed in favor of that issue

MEffing commented 4 years ago

Same here. I've been looking for a CSV editor that will just leave data as it is, without any fancy "smart" format detection features. I thought this was it, but I'm still losing my leading 0's... :-( I find it incredible that there's nothing that can actually do this properly.

rgregory1 commented 4 years ago

They are out the MEffing, I use Easy CSV Editor for Mac, it's wonderful and works as expected.

MEffing commented 4 years ago

Thanks. I was hoping for something free, but I can't keep wasting time. I've downloaded it now and my data looks correct. Finally!

jpdenford commented 4 years ago

I have run into the same issue. Quite frustrating as I love this tool!