Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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


Comment on Re: Excel - Detecting Date/Time and User Stamps for last update.
Download Code
Re^2: Excel - Detecting Date/Time and User Stamps for last update.
by ww (Bishop) 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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (12)
As of 2014-08-21 15:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (136 votes), past polls