Re: Excel Script can't get proper values
Re: Excel Script can't get proper values
- Subject: Re: Excel Script can't get proper values
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 02 Oct 2006 09:54:14 -0700
- Thread-topic: Excel Script can't get proper values
The reason that the code is showing up as «raw code» in chevrons is that
this must have been a script for Excel X (or earlier) and you're now opening
it while you have Excel 2004 running. Excel AppleScript was completely
re-written, from top to bottom, for Office 2004, so all the previous
keywords no longer exist in 2004, and also won't run. (The new AppleScript
is better now, but I realize that doesn't help you at the moment.)
The current keywords aren't too different from the old ones, although they
no longer are SquishedUpLikeThis, but the underlying raw code is completely
different. There's really no way of figuring it out from the raw code. Do
this:
Reinstall Office v. X on your computer if it's no longer there. There is
absolutely no problem with having v. X and 2004 simultaneously - no
conflicts whatsoever as long as you don't run both at once. (Even then,
nothing serious.) If you don't have v. X but only 2001 or 98 and your
computer can run Classic (i.e. is not an Intel machine), that's fine too. If
you're on an Intel and have only a Classic Office available you'll have to
borrow an older machine.
Assuming it's on the same machine, first quit BOTH Script Editor and Excel
2004. Now open Excel X (or 2001 or 98). Then open Script Editor. (Naturally,
if 2001 or 98, open classic SE.) Make a copy of the script in the Finder.
Now open the script copy in Script Editor. You will see all your old
familiar SquishedUpLikeThis keywords. Now go to File/Save As and Save As
Text. (Flip the File Format popup to "text".)
Now quit Excel (X/2001. etc.) AND Script Editor. Launch Excel 2004. Open the
Text version you just saved (it should have the .applescript extension). It
will open fine - as text.
Now, using the Excel 2004 dictionary, and the Excel AppleScript Reference
from MacTopia (Resources/Developer/AppleScript) if it helps, find the new
keywords that are similar and substitute. In some cases, there might be new
syntax to deal with. If you have trouble, write back here, quoting the text
version of your old script. When you get it write, you will be able to
compile the new script format, and then Save it as a script or application
again, and it will work.
--
Paul Berkowitz
> From: Oakley Masten <email@hidden>
> Date: Mon, 2 Oct 2006 09:33:46 -0700 (PDT)
> To: <email@hidden>
> Subject: Excel Script can't get proper values
>
> This use to work :)
> Now it doesn't.
>
> How do I get a translation of the "Chevron" text in
> order to make this work?
> Why does it come up with the "Chevron" text?
> How can I stop this in the future?
>
> Thanks
> Oakley
>
> [You have been terrific help in the past and I regret
> that I have not been any where near vocal enough in
> thanking you all.]
> Thanks Thanks Thanks
> [I am still working on the PhotoShop script to save
> for WEB. Haven't quite gotten it to work correctly
> yet. I will let you know]
>
> -------------
> display dialog "You must have the EXCEL Sheet OPEN
> already" & return & "If NOT - Cancel now" default
> button "Cancel"
> set Folder2Do to choose folder
>
> tell application "Microsoft Excel"
> set NumberOfTheLastRow to row of the ((«event
> XCELLasC» given «class DIRT»:«constant &ri1#dwn») of
> the «class CuRg» of «class crng» ("R1C1")) -- all one
> line
>
> display dialog "Number of rows is " &
> NumberOfTheLastRow
> ----------------EXCEL ROUTINE TO LIST 3 CELL
> CONUMNS----------
> set «class pval» of cell "R1C7" to "pr_Name"
> set «class pval» of cell "R1C8" to "th_Name"
> set «class pval» of cell "R1C9" to "POP_Name"
> end tell
> ---------------------------
> I need the count of rows so that I can process each
> one thru a list.
> the "set <class pval> of cell "R1C1" to "pr_Name" is
> just to name the cell.
>
>
>
> _______________________________________________
> 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
>
_______________________________________________
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