Re: Numbers '08
Re: Numbers '08
- Subject: Re: Numbers '08
- From: Michelle Steiner <email@hidden>
- Date: Sun, 11 Jan 2009 13:10:31 -0700
On Jan 11, 2009, at 12:49 PM, KOENIG Yvan wrote:
Alas, I am unable to find a way to grab the name of the current
sheet and/or the name of the current table.
tell application "Numbers"
set thisSheet to sheet 1 of document 1
set SheetName to name of thisSheet
set thisTable to name of table 1 of thisSheet
end tell
What I can't figure out, though is why this doesn't work:
tell application "Numbers"
set thisSheet to sheet 1 of document 1
set SheetName to name of thisSheet
set thisTable to table 1 of sheet SheetName
end tell
--> "Numbers got an error: Can’t get sheet \"Sheet 1\"."
Even if I replace the offending line with the following, I get the
same error.
set thisTable to table 1 of (get sheet SheetName)
"document" works in the above scripts even if it has never been
saved. If you have two or more open documents with the same name,
using the document name instead of the document index in the script
will result in using the frontmost of those documents, even if another
document with a different name is in front of all of them.
-- Michelle
--
"If you don't preach in my school I won't think in your church"
_______________________________________________
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