• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Date formatting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: dd: position of text
  • Next by Date: Re: Date formatting
  • Previous by thread: Re: Date formatting
  • Next by thread: Re: Date Formatting
  • Index(es):
    • Date
    • Thread