News for hackers. Stuff that matters.
Re:Excel Never Dies by OldHand2018 on Monday March 08, 2021 @12:55PM (#26389032)
> Excel constantly wants to change cell contents, in the name of improving formatting. For example, paste a table with something that excel thinks are dates, it will convert it to dates, and show the data in some format. Formatting it back to text will give you the #days since epoch instead of the original text.

This is definitely annoying behavior, but you do know that if you format the cell as text prior to pasting the data in it will keep it as text, right?

Re:Excel Never Dies by magicalhippo on Monday March 08, 2021 @02:25PM (#26390320)
> This is definitely annoying behavior, but you do know that if you format the cell as text prior to pasting the data in it will keep it as text, right?

This only works sometimes, and I have no idea when or why.

The most reliable way I've found is to copy more than one column and use the text importer thing, where you can specifically mark columns as being text.

Re:Excel Never Dies by marcosdumay on Monday March 08, 2021 @02:02PM (#26390009)
Some times yes, other times Excel will replace the format you set with what it guesses from the data. I have no idea what triggers each behavior.

What's more interesting is reading those dates by the COM interface. Depending on how the user input the data, you'll get formated dates as text or seconds since the epoch as number.