• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Office 2011 and Applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Office 2011 and Applescript


  • Subject: Re: Office 2011 and Applescript
  • From: Christian Prinoth <email@hidden>
  • Date: Thu, 17 Mar 2011 13:29:18 +0100

for example wb.ranges['A1'] does not work. Here is the explanation by has (appscript developer):

Wild guess: Excel's dictionary defines both a 'ranges' property and a 
'range' class (plural 'ranges'). AppleScript can just about deal with 
that sort of ambiguity as the compiler can determine from context if a 
'ranges' keyword is being used as a property name or element name. 
Appscript doesn't have that luxury, so has to favour one 
interpretation or the other; in this case, the former. If you need it 
to go the other way, you'll need to drop down to the aem API 
(equivalent to using chevron syntax in AS); something like: 

app('Microsoft Excel').AS_newreference(aem.app.elements('xxxx'))['B2'].value() 

You'll need to use ASDictionary to export the Excel dictionary as 
plain text in order to look up the correct four-char code to use in 
the aem reference. 

I won't bother suggesting you file a bug report on Excel - feel free 
to do so, but I don't imagine the developers will want to change 
anything as long as it's working in AS (no small achievement itself). 
It's not really their fault anyway: Apple have never provided an 
adequate spec for application developers to follow, never mind 
validation tools to check their application dictionaries are formally 
correct. So the best that any application developer can realistically 
do is test that their app works okay with AS, as that's the de facto 
standard. Appscript tries to be quirk-for-quirk compatible with AS to 
minimize these sorts of compatibility problems, but there are limits 
to what it can reasonably achieve and sometimes you just have to fall 
back to the lower-level APIs to deal with such issues. 


On Tue, Mar 15, 2011 at 17:35, Cameron Knowlton <email@hidden> wrote:
What kind of problem?

Cameron Knowlton

At 12:29 PM +0100 11/03/15, Christian Prinoth wrote:
>fwiw, there appears to be a problem with the applescript implementation of Excel that creates problems for appscript users...
>

--
Cameron Knowlton
KnowledgeVine SEO Dashboards
email@hidden
P: 250.382.0226
http://www.knowledgevine.net

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Excel: hide multiple columns with Applescript
      • From: Cameron Knowlton <email@hidden>
References: 
 >Re: Office 2011 and Applescript (From: Stan Cleveland <email@hidden>)
 >Re: Office 2011 and Applescript (From: Barry Wainwright <email@hidden>)
 >Re: Office 2011 and Applescript (From: Christian Prinoth <email@hidden>)

  • Prev by Date: Re: Need collective genius
  • Next by Date: Excel: hide multiple columns with Applescript
  • Previous by thread: Re: Office 2011 and Applescript
  • Next by thread: Excel: hide multiple columns with Applescript
  • Index(es):
    • Date
    • Thread