I bet life is learning, and there is a good saying in IT “you stop earning; when you stop learning” (never heard this before..ok i admit i made it up :)). A few days i came across a problem simply i wanted to have a small tool that can archive all the XLS & DOC files which are more then 1 month old from my harddisk to a different machine. I designed a scheduled task for achieving this functionality. In a few days i realized that some XL files are not getting archived ! After playing a detective for a few hrs i got the reason..guess what ? whenever you open an excel workbook it changes its last modified date and time to the current date and time ! hold on don’t start screaming … it does roll it back when you close it before saving but it was causing my my tool which is just checking the date time stamp to give incorrect results ! and there is even an article suggesting the same. (how did i make it work, that’s something i will cover in other article)
826741 Excel changes Modified date and time when you open the workbook
This problem occurs because when you open an Excel workbook, Excel writes the name of the current user to the header of the file. This is necessary so that other users receive the “file in use” notification. The operating system then updates the last modified date. Excel stores the original Modified date and time in memory so that it can restore the original timestamp if you close the workbook without saving changes.
As it was not enough i got a similar issue in IRM protected file but in that case excel even does not revert back the changes !! (more in another article)