• 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: Mixing Apple Script, Excel and a network
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mixing Apple Script, Excel and a network


  • Subject: Re: Mixing Apple Script, Excel and a network
  • From: David Wignall <email@hidden>
  • Date: Sat, 16 Aug 2003 13:46:39 +1200

on 16/8/2003 10:06 AM, Courtney Moore at email@hidden wrote:

> When using the syntax, mentioned below, to open a file in
> Microsoft Excel I have no problems when using my machine that is not
> authenticating. When I try the syntax on my networked machine I get the
> following error:
> "Microsoft Excel got an error: "pathToFile" doesn't understand the OpenText
> message."
> Not quite sure what the deal it, does anyone have any ideas?!!
>
>
>
> Syntax:
> Tell application "Microsoft Excel"
> Activate
> OpenText "pathToFile" Orgin xlMacintosh StartAtRow 1

Here's the problem. pathtoFile is a string that doesn't mean anything to the
script. It needs to be a string that represents a valid file path.

As Paul Berkowitz said in his reply to your Importing to Excel message:

set TextFileToImport to "Macintosh HD:Users:courtney:Desktop:AStest.txt"

Or as both Kai and I have mentioned you can use the choose file command in
the script to locate the file needed, assuming that level of interaction was
within the scope of the project. However, if you run the one line script
'choose file' in your script editor of choice you should be able to copy the
file path from the result window, or console window or what have you.

--
Dave
_______________________________________________
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.

References: 
 >Mixing Apple Script, Excel and a network (From: Courtney Moore <email@hidden>)

  • Prev by Date: Control PPP via AppleScript in OS X
  • Next by Date: Re: Control PPP via AppleScript in OS X
  • Previous by thread: Mixing Apple Script, Excel and a network
  • Next by thread: Mixing Apple Script, Excel and a network
  • Index(es):
    • Date
    • Thread