Even "Number Format: General" still omits the starting 0. I can't even get it to show up if I lead with a space or a "-." What is the trick? This is super-annoying.
Even "Number Format: General" still omits the starting 0. I can't even get it to show up if I lead with a space or a "-." What is the trick? This is super-annoying.
9 Comments
OhNoMoreLemmy@lemmy.ml · 13 pts · 26d
There's two options, one is to turn it into a string as discussed.
The other is:
https://help.libreoffice.org/latest/en-US/text/scalc/guide/integer_leading_zero.html
death_to_carrots@feddit.org · 8 pts · 26d
Start with a »'«. Or configure the cell to not be a number, but a string.
BevsDad@lemmy.ca · 2 pts · 26d
Yeah, 050 is a string not a number programing wise.
Dookieman12@piefed.social · 4 pts · 26d
Change the number format to 'Text'.
General will attempt to apply the correct format based on cell contents. The numbers are making it implicitly apply the 'Number' format to the cell.
Zier@fedia.io · 4 pts · 25d
Format Cells / Numbers (tab) Category (choose Number) / Format (is General) / Options (Leading Zeros 1)
Do not format numbers as 'Text' if you need to use them in formulas of finance like sums.
n4sdaq@lemmy.dbzer0.com · 2 pts · 26d
Did you try putting a ' at the start of the cell?
Flagstaff@programming.dev · 2 pts · 24d
Thanks, I do know about that but I want to avoid using an escape char because I want to be able to copy the cell without hidden characters entering the clipboard.
HubertManne@piefed.social · 1 pts · 26d
people already explained the options but just want to mention I just do the string thing. The only time I come across the need is for id type numbers and usually am not going to do any math on it. in that case i makes sense to treat it as a string.
Flagstaff@programming.dev · 1 pts · 22d
Right, same; this is part of an ID and is needed. I'm not at a computer right now to check but I'll look for it some more, thanks to the other commentators' guidance here (I had posted here because I couldn't find it)...