M
Mitch Cohen
I wrote an applescript for Excel 2004 which works fine. Someone asked
me about using it in Excel X so I thought I'd give it a try. I was
surprised that I couldn't get ANYTHING in AppleScript to work with Excel
X.
Given the following script:
tell application "Microsoft Excel"
activate
make new workbook
set value of cell 1 of row 1 to "hello"
end tell
you'd think no problem. But it fails on "make new workbook" - error
message is "Microsoft Excel got an error: Can't make a workbook."
If I comment out that line, the same sort of thing happens on setting
the value of the cell: "Microsoft Excel got an error: Can't set value of
cell 1 of row 1 to "hello"."
These are really simple, basic commands which have probably worked since
the dawn of time. These are just manually typed into Script Editor
while Excel X is already open (and Excel 2004 is not open). Reading
something else here I logged into a separate user account and did these
as the only tasks, same result.
Any idea what's going on?
me about using it in Excel X so I thought I'd give it a try. I was
surprised that I couldn't get ANYTHING in AppleScript to work with Excel
X.
Given the following script:
tell application "Microsoft Excel"
activate
make new workbook
set value of cell 1 of row 1 to "hello"
end tell
you'd think no problem. But it fails on "make new workbook" - error
message is "Microsoft Excel got an error: Can't make a workbook."
If I comment out that line, the same sort of thing happens on setting
the value of the cell: "Microsoft Excel got an error: Can't set value of
cell 1 of row 1 to "hello"."
These are really simple, basic commands which have probably worked since
the dawn of time. These are just manually typed into Script Editor
while Excel X is already open (and Excel 2004 is not open). Reading
something else here I logged into a separate user account and did these
as the only tasks, same result.
Any idea what's going on?