• 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
Possible bug with AppScript and Excel?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Possible bug with AppScript and Excel?


  • Subject: Possible bug with AppScript and Excel?
  • From: Christian Prinoth <email@hidden>
  • Date: Thu, 29 Jul 2010 15:43:44 +0200

Hi, I am having some problems handling axes in Excel charts via python and appscript.

I am using apple's stock python 2.6.1, appscript 0.21.1 and Excel 12.2.5 on Snow Leopard 10.6.4

Here is how I am trying to get hold of an axis:
c=app('Microsoft Excel').get_axis(app.active_sheet.chart_objects[1].chart,axis_type=k.value_axis)

now c contains
app(u'/Applications/Microsoft Office 2008/Microsoft Excel.app').active_sheet.chart_objects[1].chart.axes.ID(131073)

but if I do:
c2=app('Microsoft Excel').get_axis(app.active_chart,axis_type=k.value_axis)

apparently I get the same result, in fact c==c2 returns true. Yet, if I try to access c, I get an error, eg
In [16]: c.maximum_scale()
------------------------------------------------------------
Traceback (most recent call last):
  File "<ipython console>", line 1, in <module>
  File "build/bdist.macosx-10.6-universal/egg/appscript/reference.py", line 643, in __call__
    return self.get(*args, **kargs)
  File "build/bdist.macosx-10.6-universal/egg/appscript/reference.py", line 499, in __call__
    raise CommandError(self, (args, kargs), e, self.AS_appdata)
CommandError: Command failed:
OSERROR: -1728
MESSAGE: The object you are trying to access does not exist
COMMAND: app(u'/Applications/Microsoft Office 2008/Microsoft Excel.app').active_sheet.chart_objects[1].chart.axes.ID(131073).maximum_scale.get()

but c2 works perfectly:
In [17]: c2.maximum_scale()
Out[17]: 0.080000000000000016

Does anyone know what I am doing wrong or if there is a bug somewhere?
 _______________________________________________
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:
    • Re: Possible bug with AppScript and Excel?
      • From: Tommy Bollman <email@hidden>
  • Prev by Date: Re: Public Domain Library Lister
  • Next by Date: Re: Possible bug with AppScript and Excel?
  • Previous by thread: Re: Library Lister
  • Next by thread: Re: Possible bug with AppScript and Excel?
  • Index(es):
    • Date
    • Thread