Re: Date formatting
Re: Date formatting
- Subject: Re: Date formatting
- From: bill <email@hidden>
- Date: Thu, 25 Apr 2002 10:29:13 +0800
Eric,
>
how to keep Excel from changing the format to a date
When you input the file name e.g. 3April 2001.xls2, try append a single
quote 392 in front of the file name.
tell application "Microsoft Excel"
tell Worksheet 1 of document 1
set Value of Cell "R1C1" to "'" & "April 2001.xls"
end tell
end tell
When you do a find and replace to get rid of the .xls. it won9t converts the
text to a date.
tell application "Microsoft Excel"
tell Worksheet 1 of document 1
Replace every Cell What ".xls" ReplaceWith ""
end tell
end tell
Later, to get the value of this cell, it9s 3April 20012, in Unicode text.
tell application "Microsoft Excel"
tell Worksheet 1 of document 1
get Value of Cell "R1C1"
end tell
end tell
-- "April 2001"
Excel will treat anything after single quote it as text, and will cease to
change the format.
Finally, using applescript & FMP, couldn9t you import the file name directly
into the FMP database record?
Bye
bill
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.