I have tried desperately to change the date formatting in Excel with no success.
The problem: I have a column with dates formatted like “19-01-09”, “20-01-09” etc. In order to use the excel data in another applescript I need them to be “2009-01-19”, “2009-01-20” etc. Is there a way to do this using applescript?
I’m banging my head against Excel 2008 on Mac OS X 10.5.8
/backelin
Hi,
try this
set theColumn to 1
tell application "Microsoft Excel"
set number format local of column theColumn of used range of active sheet to "yyyy-mm-dd"
end tell
But actually the date format settings don’t matter, you can get the value as class date directly
Thanks for the quick reply, Stefan.
I have tried a similar route before, but the result is “yyyy-00-01”. Any ideas?
/T
I figured it out!
I keep forgetting that the Swedish version of Exel requires its own syntax in order to work. Instead of “yyyy-mm-dd” I had to use “Ã…Ã…Ã…Ã…-mm-dd”. (“Ã…” being short for “Ã…r”, Swedish for “year”.)
I never thought I would live to see the day when a quadruple umlaut would be the solution to my scripting problem.
Thanks Stefan for pointing me in the right direction.
/backelin