this post was submitted on 12 Feb 2024
762 points (98.4% liked)

Programmer Humor

32495 readers
499 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] danc4498@lemmy.world 30 points 9 months ago (2 children)

CSV files having their leading zeros cut off fuck my entire world up.

[–] christophski@feddit.uk 1 points 9 months ago

Dealing with phone numbers and people using excel....

[–] wizardbeard@lemmy.dbzer0.com 1 points 9 months ago

Instead of just opening them with Excel, make a blank workbook or sheet, go to the data tab, import from text/csv. It'll give you a bunch of menus and such where you can adnust how it reads the file and how it will format columns. Any column with leading zeros you want as text. It doesn't fuck with "as text" columns.

The only caveat is that once you've imported the CSV that way, you'll want to open the data sources tab and delete the connection to the csv file, otherwise changes in the original csv file will change shit in your spreadsheet, but only if excel feels like syncing it. Better to shut that off and do it yourself as needed.