this post was submitted on 12 Feb 2024
746 points (98.3% liked)

Programmer Humor

32247 readers
523 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 30 points 8 months ago (2 children)

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

[–] [email protected] 1 points 8 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.

[–] [email protected] 1 points 8 months ago

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