Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Excel - Detecting Date/Time and User Stamps for last update.

by Util (Priest)
on Jun 09, 2007 at 00:39 UTC ( #620126=note: print w/replies, xml ) Need Help??


in reply to Excel - Detecting Date/Time and User Stamps for last update.

I don't know how to get the user info, but the time of last modification should be the time of last file write, unless the spreadsheet is currently open. So, instead of asking Excel, just ask the file system by using stat:

$ touch foo.txt $ perl -wle 'print scalar localtime( ( stat "foo.txt" )[9] )' Fri Jun 8 19:38:29 2007

Replies are listed 'Best First'.
Re^2: Excel - Detecting Date/Time and User Stamps for last update.
by ww (Archbishop) on Jun 09, 2007 at 00:53 UTC
    Or, since we're talking MS here, use double quotes outside and singlequote inside since no interpolation is required. Otherwise cmd will complain about a missing terminator.
    >perl -wle "print scalar localtime( ( stat 'blossomshots_LJW.txt' )[9] + );"

    Output:
    Fri Jun 8 20:42:08 2007

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://620126]
help
Chatterbox?
[choroba]: linenlessnesses

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2017-10-17 15:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (233 votes). Check out past polls.

    Notices?