Re: excel script does not work
Re: excel script does not work
- Subject: Re: excel script does not work
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 18 Aug 2002 13:07:46 -0700
On 8/18/02 12:44 PM, "Gerd" <email@hidden> wrote:
>
Hallo,
>
>
i tried to run following script under OS X 10.1.4 and Excel (Office X).
>
But i always get an error message.
>
>
set Firma to "Hamburg"
>
>
tell application "MS Excel"
>
try
>
tell Worksheet 1 of document 1
>
set Value of Cell "R2C1" to Firma
>
end tell
>
on error errMsg number errNum
>
display dialog errNum
>
end try
>
end tell
>
>
error message - 10006
>
>
Text: Microsoft Excel got an error: can't set value of cell "R2C1" of
>
Worksheet 1 of document 1
>
to Firma
>
>
Does anybody know the reason ??
I may. Are you using a German version of Excel? It turns out that the French
and German versions each have their own local expressions for "R1C1" type
format. French uses "L1C1", German uses "Z1S1". So try "Z2S1".
A serious problem - a terminal bug - arises when you want to call UsedRange:
in French and German that's returned in (English) "R1C1" format and then
Excel can't understand its own range. I'm not sure if that bug got fixed
with the Office X SR-1 update - could you check it out and let me know? (I
discovered the bug when a French user of one of my scripts hit it. MS
eventually tracked down the bug and confirmed. I haven't checked back since
SR-1.)
If you're using an English-language Excel, I don't what the problem might
be, except that 'document 1' is not an expression I have ever used with
Excel: it should be
tell application "MS Excel"
tell Worksheet 1 of Workbook 1
according to the Dictionary, so that's what I always use, and it always
works.
--
Paul Berkowitz
_______________________________________________
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.