• 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: Applescript-users Digest, Vol 3, Issue 369
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applescript-users Digest, Vol 3, Issue 369


  • Subject: Re: Applescript-users Digest, Vol 3, Issue 369
  • From: johnnylundy <email@hidden>
  • Date: Thu, 20 Jul 2006 20:19:11 -0400

Try this


tell application "Microsoft Excel" open workbook workbook file name repo_prompt end tell

Sincerely,

R. Harold Holbrook Jr., M.D.

On Jul 20, 2006, at 3:00 PM, applescript-users- email@hidden wrote:

Message: 9
Date: Thu, 20 Jul 2006 14:24:27 -0400
From: "Borsz, Andy" <email@hidden>
Subject: Opening Documents in Excel with Applescript
To: <email@hidden>
Message-ID:
<email@hidden >

Content-Type: text/plain; charset="us-ascii"


Hello,

I'm having significant problems trying to open a file in Microsoft Excel
X for Mac with Applescript.




Here's my code:



set repo_prompt to "Please select document"



set f_default to path to desktop folder as alias



set repo_design to choose file with prompt repo_prompt default location
f_default without invisibles




tell application "Microsoft Excel"

      Activate

      Open repo_design

end tell



I select a .xls document when prompted and then I get the Applescript
Error: "Microsoft Excel got an error: '' could not be found.__Check the
spelling of the file name, and verify that the file location is correct.
If you are trying to open''"




In the event log it shows that when I select my document It returns it
as:



Alias "G4-PB2:Users:etc"



as would be expected.



If I switch the line tell application "Microsoft Excel" to tell
application "BBEdit" and select a .txt or .xml file BBEdit opens the
file fine as I would hope. Can anyone tell me why Excel is rejecting my
code?




Thanks very much for your time, and have a good day.



Andy


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: Re: Case sensitive find/replace
  • Next by Date: Re: Opening Documents in Excel with Applescript
  • Previous by thread: Re: Keychain scripting
  • Next by thread: Re: Applescript-users Digest, Vol 3, Issue 369
  • Index(es):
    • Date
    • Thread