more Excel script woes - paths
more Excel script woes - paths
- Subject: more Excel script woes - paths
- From: David Cake <email@hidden>
- Date: Thu, 11 Oct 2007 21:31:55 +0800
All I really want to do is (in the middle of a script that
does a bunch of things)
tell application "Microsoft Excel"
save workbook as filename "myfile.xls"
end tell
but that gets me is the Applescript error "Microsoft Excel
got an error: Can't continue save workbook as."
Any suggestions as to how to actually work out what is wrong?
So, might as well talk about what I've tried so far, though
I'm far from convinced I'm on the right track.
Now, I suspect this might be something to do with not
supplying a full path to my file, and Excel being confused as to what
is the current folder (or at least, Excels idea not being the same as
mine), because I have no idea how to set the current folder. I've
already opened files in the current folder etc, but its just a guess
that this will lead Excel to the light.
But this just, so far, leads me into other frustration, with
Finder scripting, as I don't know how to get my working folder into a
useful text path. I want to do something like
tell application "Finder"
set currentfolder to "filename" of desktop
set folderpath to path to currentfolder as string
end tell
save workbook as folderpath & "myfile.xls"
but that is getting me nowhere - something about not being
able to make a folder into a constant.
Regards
David
PS many thanks to Olof Hellman of the Microsoft MacBU who answered
my previous Excel scripting query.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden