Saturday, October 1, 2022

#1 2022-09-21 05:17:51 pm

4CardsMan
Member
Registered: 2020-12-29
Posts: 14

Simple Excel Script Fails

Applescript:

activate application "Microsoft Excel"
tell "Microsoft Excel"
   return active sheet
end tell

This gives error "Expected End of Line But Found Identifier"
Im obviously missing something really simple, but can't figure out what.

Offline

 

#2 2022-09-21 06:30:54 pm

estockly
Member
Registered: 2009-01-03
Posts: 132

Re: Simple Excel Script Fails

You need "application" in your tell block.

Applescript:


activate application "Microsoft Excel"
tell application "Microsoft Excel"
   return active sheet
end tell

Last edited by estockly (2022-09-21 06:31:24 pm)

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)