Re: Bug in (scripting) Excel.
Re: Bug in (scripting) Excel.
- Subject: Re: Bug in (scripting) Excel.
- From: kai <email@hidden>
- Date: Mon, 29 Sep 2003 01:50:29 +0100
on Sun, 28 Sep 2003 18:31:16 -0400, Deivy Petrescu wrote:
>
On Sunday, Sep 28, 2003, at 11:35 US/Eastern, kai wrote:
>
>
> While I can appreciate both points (c'mon kai, get down off the fence!), I
>
> tend to share Deivy's view that Excel should still perform as normal - just
>
> without updating the on-screen representation of events.
>
>
kai, thanks for your independent opinion (I'll send you the money as
>
we've discussed earlier...)
Don't forget, now: used, untraceable notes in various denominations and
currencies...
>
> The behaviour of Excel X seems, in this respect, to be inconsistent with
>
> previous versions. Since I don't consider the change an enhancement, I'm
>
> still tempted to conclude that it's a bug.
>
>
Again, thanks, your points were very good.
>
Since I do not have SE or Smile in earlier than X versions here, could
>
you check that this script would error in 9.2:
>
>
tell Application "Microsoft Excel"
>
set ScreenUpdating to false
>
Open "Hard Disk:Desktop Folder:Excel Tests:xlTest1"
>
Open "Hard Disk:Desktop Folder:Excel Tests:xlTest2"
>
Open "Hard Disk:Desktop Folder:Excel Tests:xlTest3"
>
Tell Window "xlTest1"
>
LastCell Range "A1" Direction xlToRight
>
get Column of Range "R1C4" of Worksheet "Sheet1" of Workbook "xlTest1"
>
end tell
>
end tell
>
>
It errors here.
Here too, Deivy. However, errors occur on *either* line within the Tell
Window block - and regardless of whether ScreenUpdating is true or false:
======================
Tell Window "xlTest1"
LastCell Range "A1" Direction xlToRight
--> Microsoft Excel got an error: Range "A1" of Window "xlTest1" doesn't
understand the LastCell message.
[Error number -1708: the AppleEvent was not handled by any handler]
Note: A similar error occurs in a 'Tell Workbook' block
----------------------
Tell Window "xlTest1"
get Column of Range "R1C4" of Worksheet "Sheet1" of Workbook "xlTest1"
--> Microsoft Excel got an error: Can't make some data into the expected
type.
[Error number -1700: bad parameter data or unable to coerce the data
supplied]
Note: A similar error occurs in a 'Tell Workbook' block
======================
However, the following all work:
======================
tell Workbook "xlTest1"
LastCell Range "A1" of Worksheet 1 Direction xlToRight
--> Range "R1C4" of Worksheet "Sheet1" of Workbook "xlTest1" of application
"Microsoft Excel"
----------------------
tell Worksheet 1 of Workbook "xlTest1"
LastCell Range "A1" Direction xlToRight
--> Range "R1C4" of Worksheet "Sheet1" of Workbook "xlTest1" of application
"Microsoft Excel"
----------------------
tell Range "A1" of Worksheet 1 of Workbook "xlTest1"
LastCell Direction xlToRight
--> Range "R1C4" of Worksheet "Sheet1" of Workbook "xlTest1" of application
"Microsoft Excel"
======================
tell Workbook "xlTest1"
Column of Range "R1C4" of Worksheet 1
--> 4
----------------------
tell Worksheet 1 of Workbook "xlTest1"
Column of Range "R1C4"
--> 4
----------------------
tell Range "R1C4" of Worksheet 1 of Workbook "xlTest1"
Column of it
--> 4
----------------------
(If 'Window' is inserted in place of 'Workbook', the above 6 examples will
all error.)
HTH
---
kai
_______________________________________________
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.