• 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: Recalculation of AppleWorks Spreadsheet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recalculation of AppleWorks Spreadsheet


  • Subject: Re: Recalculation of AppleWorks Spreadsheet
  • From: T&B <email@hidden>
  • Date: Mon, 27 May 2002 18:04:53 +1000

The AppleWorks 6 dictionary offers the "recalculate" command which I
assume is meant to do this. The actual dictionary entry is:

recalculate: Recalculate a spreadsheet
recalculate spreadsheet layer -- the spreadsheet to recalculate

My several script attempts
(with the corresponding error messages) are as follows

set myfile to "Macintosh HD:Users:mike:testsheet" as alias
tell application "AppleWorks 6"

(2) recalculate myfile -- Error`: myfile "doesn't
understand the recalculate message"

Bzzz. Wrong answer (as you found).

Okay, let's step through the dictionary.

The recalculate command syntax is:

recalculate: Recalculate a spreadsheet
recalculate spreadsheet layer -- the spreadsheet to recalculate

which means that you can recalculate any object whose class is "spreadsheet layer".

But what objects are "spreadsheet layers"? Let's look for it in the same dictionary. It is listed as the class of the "spreadsheet" property of document:

Class document: an open document
Properties:
spreadsheet spreadsheet layer [r/o] -- the documents spreadsheet (if spreadsheet document)

So, one answer is:

tell application "AppleWorks 6"
recalculate spreadsheet of document 1
end tell

or you could use any other document reference such as:

recalculate spreadsheet of document "My spreadsheet"

You can also find that the "spreadsheet" property of a "spreadsheet frame"
has the "spreadsheet layer" property, so you could:

recalculate spreadsheet frame 1 in document "My drawing document"

The process of reading through an AppleScript dictionary is described in detail at:
http://www.tandb.com.au/applescript/tutorial/
which even happens to use AppleWorks for the examples.

Tom
T&B
_______________________________________________
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: clip2gif + choose in a determined folder
  • Next by Date: Re: Saving lists of records to a text file
  • Previous by thread: Re: Recalculation of AppleWorks Spreadsheet
  • Next by thread: Re: Recalculation of AppleWorks Spreadsheet
  • Index(es):
    • Date
    • Thread