r/shittyprogramming • u/mort96 • Aug 07 '20
Scientists rename genes because Microsoft Excel reads them as dates
https://www.engadget.com/scientists-rename-genes-due-to-excel-151748790.html
317
Upvotes
77
u/Western_Routine Aug 07 '20
Wtf. You can reformat the cells...
4
u/_-ammar-_ Aug 08 '20
why they use excel in the first place ?
24
u/Capt_Fluffy_Beard Aug 08 '20
Software Engineer working in Bioinformatics here. This has been an enormous pain in the ass for me for the past 10 years or so. Everyone always wants data exported to Excel, not CSV, because they just have to have fancy formatting. So I build something that exports hundreds of thousands of rows of gene expression data to Excel. And then I brace myself for the complaints... "your app is broken! It's exporting dates!". Even if I force the cell type to string, they change it and manage to turn gene names into dates then complain to me about the error in my code. It's infuriating.
48
u/Aphix Aug 07 '20
Excel is such a nightmare with its auto-formatting.
I can't describe how many issues I've seen from clients attempting to provide datasets that were borked simply by opening and accidentally re-saving in Excel (or simply exporting as CSV!) after Excel tried to be "smart" and thusly reformatted and exported the formatted (yet untouched) cells.
It would make so much more sense if it actually exported the source cell data, rather than the re-formatted cell content.
Unfortunately, they gotta keep those silly certifications worth something, so companies like Microsoft and Oracle will purposefully build foot-guns like these into their software as long as people choose their software over alternatives.
13
u/chaosking121 Aug 07 '20
While looking into the documentation for the XLRD python library, I learnt just how incredibly nightmarish Excel's date handling is.
8
u/mattjstyles Aug 08 '20
I'm not sure there is an "issue" to respond to!
Their response would surely just be a link to the cell formatting help page.
Sounds like the community has come up with a reasonable solution anyway.
7
u/TidePodSommelier Aug 08 '20
"I'm Helping" - Ralph "Excel" Wiggum
4
u/khafra Aug 08 '20
Great, now let’s name some genes after Pandas reserved names.
2
u/general_dispondency Aug 08 '20
Just use Apache POI and save the headache.
1
u/feminas_id_amant Aug 08 '20
Set the cell format to "text" and ride off into the sunset.