C
Charandy
Summary: Using DATEDIF in MS Excel can cause (apparently unrecoverable) error message "File Error: data may have been lost."
Details:
I've been using the same spreadsheet for around a year. I saved it one evening and next morning when I tried to open it, I got the message:
File Error: data may have been lost
Most of what I read on the internet had either to do with writing to an Excel sheet using a programming language (which I have not done in this case) or with upgrades. I rarely if ever download or install upgrades because it's a hassle. However, since I was really stuck, I followed instructions/suggestions I'd read and spent nearly all day downloading over 70 "important" Windows upgrades, which I guess includes MS Office upgrades. This did not work. After all the upgrades, the problem was the same.
The solution: it turned out that I had been using the undocumented DATEDIF function. I used it because it's superior for what I need to do. Somehow anExcel upgrade happened without my knowing it, and the current version of Excel appears to no longer support the DATEDIF function.
Replacing all the usages of/calls to DATEDIF fixed the problem. This sucked; DATEDIF was (when it worked) much more powerful and cleaner to use. But the new version of the code works fine.
FYI
Details:
I've been using the same spreadsheet for around a year. I saved it one evening and next morning when I tried to open it, I got the message:
File Error: data may have been lost
Most of what I read on the internet had either to do with writing to an Excel sheet using a programming language (which I have not done in this case) or with upgrades. I rarely if ever download or install upgrades because it's a hassle. However, since I was really stuck, I followed instructions/suggestions I'd read and spent nearly all day downloading over 70 "important" Windows upgrades, which I guess includes MS Office upgrades. This did not work. After all the upgrades, the problem was the same.
The solution: it turned out that I had been using the undocumented DATEDIF function. I used it because it's superior for what I need to do. Somehow anExcel upgrade happened without my knowing it, and the current version of Excel appears to no longer support the DATEDIF function.
Replacing all the usages of/calls to DATEDIF fixed the problem. This sucked; DATEDIF was (when it worked) much more powerful and cleaner to use. But the new version of the code works fine.
FYI