LibreOffice doesn’t choose the model to be used for loading a file based on the file extension, but based on the mime type stored in the file itself. If nothing is stored there, plain text may be supposed, and Writer will be used
Only the OS (Windows in specific) associates applications with the file extensions, and LibreOffice may try to open a plain-text file with Calc if the extension is .csv
.
The .ods
is the default extension for zipped spreadsheet files. It can be changed to whatever you choose without changing the mime type describing the actual content.
If a file opens to a display of thousands of “#” it is corrupted beyond repair anyway.
If there should be hope to recover the document, you need to find a backup, or a probably “deleted” but not yet overwritten (on the storage medium) version by means directly accessing the file systen (“Recuva” or the like.)
As long as you are on pursuit for recovery, use your storage mediums as little as possible. Every action may overwrite something needed for successful recovery.
BTW: Most likely LibreOffice is not the culprit. Common causes for file corruption of the kind are system breakdowns, forced shutdown during save operations, removal of media like “thumb-drive”, hardware failures, general system corruption. …
You may find examples and suggestions starting here: Search • Apache OpenOffice Community Forum. (This older forum has a lot of help and you can actually find it again in many cases.)