Domanda

Is there a COM equivalent API/SDK for developing custom apps for iWork (specifically Numbers) or Mac Excel. I have found that there is only Apple Script (but support for which has been diminished) but I don't think this will be enough for thr real-time financial applications I would like to create.

If there is no COM equivalent API/SDK, what is the preferred way, if any, of achieving such programmatic control over applications in the iWork suite (or Mac Excel)?

Things I would like to achieve, for example, are:

  • Writing to sheets, cells and ranges
  • Pulling data from external real-time sources (sockets etc.)
  • Adding custom controls such as ribbons in excel

Thanks

È stato utile?

Soluzione

Applescript support was added back to Numbers 3.1 after being removed in Numbers '13. As long as you have '09 or 3.1, Applescript support would not be a problem.

It sounds like you're trying to write the application as a layer over a running version of Numbers/Excel, and not really as a standalone application. In that case, it sounds like your best bet may be using VBA for Mac with Excel. I'm not very familiar with VBA, but this Stack Overflow question has some example code for making a custom toolbar, and this forum has example socket code. VBA also allows you to create Macros for working with sheets, cells, and ranges.

If you want a standalone app, you could split the domains into separate languages. Use Objective-C/Bash/Python for the socket stuff, Applescript for manipulating spreadsheets, and VBA for GUI elements.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top