次の方法で共有


Excel Changes Last Modified Date

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
https://support.microsoft.com/default.aspx?scid=kb;EN-US;826741

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)

Comments

  • Anonymous
    September 27, 2007
    For some reason, my correct "modified date" is not rolling back, even if I just open and then close.  What would cause this? Victor

  • Anonymous
    August 13, 2008
    I'm having the same issue - the modified date does not roll back. It is a right royal pain in the backside!!

  • Anonymous
    December 20, 2009
    i m too facin d same issue.. Aftr opening an excel file, the timestamp gets changed to current date and time and not reverting back to original after closing d file without saving. The things dont stop here.. Aftr I open the open other excel file then for the previous file the timestamp gets modified to previous original one and for the new file opened it changes to surrent date and time. Any reasons for lacking excel..