Live data from Hacker News

Cursed Excel: "1/2"+1=45660

quadratichq.com

51–60 of 144 posts

Re: Cursed Excel: "1/2"+1=45660

#51

Curious to wonder how many academic papers/other kinds of analysis have perhaps come to incorrect conclusions because of these date inconsistencies!

I'm sure it's not zero.

Related story from a few years ago: https://www.theverge.com/2020/8/6/21355674/human-genes-renam...

Re: Cursed Excel: "1/2"+1=45660

#52
post #38

Earlier quoted context omitted.

That because Excel defaults to treating numeric data as a number and leading zeros are extraneous and it will strip them off before storing the value (and it will right justify the display). The root issue is that zipcodes though numeric in content (at least in the US) should not be treated as number (data type) but instead as a text (string) value To tell Excel to treat this numeric data as a string you to either *…

Leading zeros are not extraneous and should not be removed though

For numbers they are extraneous, for strings of digits they are not.

Re: Cursed Excel: "1/2"+1=45660

#53
> Unfortunately, news of the 1582 promulgation had not yet reached the developers of Lotus 1-2-3, so they assumed that 1900 (being a multiple of 4) was a leap year.

Joel Spolsky mentions a more charitable take on this from Ed Fries:

> Lotus had to fit in 640K. That’s not a lot of memory. If you ignore 1900, you can figure out if a given year is a leap year just by looking to see if the rightmost two bits are zero. That’s really fast and easy. The Lotus guys probably figured it didn’t matter to be wrong for those two months way in the past.

https://www.joelonsoftware.com/2006/06/16/my-first-billg-rev...

Re: Cursed Excel: "1/2"+1=45660

#54

I would be careful on dates not just before 1582 but before 1753. Great Britain and its colonies (which included USA) did not change to Gregorian until 1752 and also to confuse more changed the date on when the year changed from March to 1st January. If you are in Greece or Russia be even more aware as that will be around 1920 when they changed.

Britannica: "The Council of Nicaea in 325 decreed that Easter should be observed on the first Sunday following the first full moon after the spring equinox (March 21). Easter, therefore, can fall on any Sunday between March 22 and April 25."

The correct date for Easter was a huge deal in the early Church. The Pope brought Easter back into conformity with Nicaea by reforming the calendar -- astronomical knowledge had improved a lot over the centuries.

Re: Cursed Excel: "1/2"+1=45660

#55
post #38

Earlier quoted context omitted.

That because Excel defaults to treating numeric data as a number and leading zeros are extraneous and it will strip them off before storing the value (and it will right justify the display). The root issue is that zipcodes though numeric in content (at least in the US) should not be treated as number (data type) but instead as a text (string) value To tell Excel to treat this numeric data as a string you to either *…

Leading zeros are not extraneous and should not be removed though

Aren't they exactly the definition of "extraneous"?

Re: Cursed Excel: "1/2"+1=45660

#56

The one that always bites me is Excel truncating the leading zero in US zip codes (they start with 0 in the Northeast US). I’m wondering if that would have happened if Microsoft was located in Boston instead of Seattle.

The postal service has learned and knows to compensate for this. If you mail something with four digits for the zip code, it will be treated as if it had a leading 0 and routed to the northeast.

Re: Cursed Excel: "1/2"+1=45660

#57
post #33
post #27

Earlier quoted context omitted.

in my country you read and speak numbers 97 like 'seven and ninety'. this is normal.. :p aslong as we dont base our endianess on how french pronounce or read nrs i think we can work with it. that being said, i am for ISO notation if you want to order something in a list. year, month, day seems logical in this case as it will easily sort chronologically. i dont see another real reason why one would be better than anot…

> aslong as we dont base our endianess on how french pronounce or read If you're annoyed by French numbers (which come from Gauls counting in 20s) try numbers in Danish.

I am trying to learn Danish. I cannot agree with this enough.

Consider "halvtreds," the Danish word for 50. A reasonable person might expect it to mean "half-three" based on pattern recognition and the fact that tre is three. But no! It's actually a compressed version of "halvtredsindstyve," meaning "half-third-times-twenty" or (2.5 × 20).

This continues with "tres" (60), "halvfjerds" (70), and "firs" (80)—all using a vigesimal system that, if you studied French, seems reasonable.

Except, well, the Danes don't properly sanitize their inputs. "femoghalvfjerds" (75) translates to "five-and-half-fourth-times-twenty," combining decimal and vigesimal systems with zero regard for foreigners...

Re: Cursed Excel: "1/2"+1=45660

#58

The one that always bites me is Excel truncating the leading zero in US zip codes (they start with 0 in the Northeast US). I’m wondering if that would have happened if Microsoft was located in Boston instead of Seattle.

Zip codes I sleep.

You don't want to know how many phone numbers in various databases show up in exponential notation. Not gonna talk about it.

Re: Cursed Excel: "1/2"+1=45660

#59

Earlier quoted context omitted.

(For good reason) Language is a picky thing in Canada, it's very important (when selling to the federal government or Québec) that both English and French localizations have equal footing. To open a en-US XLSX file in a fr-CA copy of Excel, you will need the en-US language pack. If you make this a requirement for a Québec government entity... you will not get that contract.

> To open a en-US XLSX file in a fr-CA copy of Excel, you will need the en-US language pack Are you sure? That sounds insane. Maybe if you're exporting a CSV where you insert the formulas as text, and expect the Excel to do some magic conversion.. I'm pretty sure that XLSX file is "universally" openable, and the user using the fr-CA copy of Excel will see =SOMME( ... ), doesn't matter what locale the source Excel is.…

ChatGPT is often wrong, so this is meaningless unless you go and find the actual source.

Re: Cursed Excel: "1/2"+1=45660

#60

Earlier quoted context omitted.

(For good reason) Language is a picky thing in Canada, it's very important (when selling to the federal government or Québec) that both English and French localizations have equal footing. To open a en-US XLSX file in a fr-CA copy of Excel, you will need the en-US language pack. If you make this a requirement for a Québec government entity... you will not get that contract.

> To open a en-US XLSX file in a fr-CA copy of Excel, you will need the en-US language pack Are you sure? That sounds insane. Maybe if you're exporting a CSV where you insert the formulas as text, and expect the Excel to do some magic conversion.. I'm pretty sure that XLSX file is "universally" openable, and the user using the fr-CA copy of Excel will see =SOMME( ... ), doesn't matter what locale the source Excel is.…

It might have changed since I last had to deal with this (I hope!) but excel, at least ~5 years ago, was storing cell contents as they appear in the function box in the UI. As in, `1,23` is 1 and 23/100 when read in fr-CA, and this would apply to the function names as well. So `=SOMME(...)`. Excel is smart enough to pick up on a locale flag in the file format, but obviously it then shows you a dialog asking you to convert it, needing the language pack.

I also won't assume that we were making "good" excel documents. It's possible we were shipping badly made exports haha

Post reply on HN