0

MS introduced JavaScript API for Excel. Based on the doc it seems like it supports desktop version of Excel too.

For c# VSTO addin the way to communicate with Excel is through Marshaling (COM object). Chaos happens if too many COM objects are acquired without proper clean up.

So the question is, does the js addin has those pitfalls? More specifically does js API use COM at all? If it does, is there any difference between Windows and Mac version? I thin Mac does not have the concept of COM (correct me if im wrong)

6
  • I don't really know if there's a difference between MAC and Win Office here. This JS also works on tablet versions of Excel and on Excel on-line. So far I'm not impressed with performance, but the fact that it runs on multiple platforms is very nice indeed. NB: There is a dedicated tag for questions like this one: Office-js Commented Dec 14, 2016 at 21:08
  • @jkpieterse yea I wouldn't expect awesome performance from the start. But Im just tired of battling with COM object. Thanks for mentioning the tag btw Commented Dec 14, 2016 at 21:12
  • Worth a visit: buildingofficeaddins.com Commented Dec 14, 2016 at 21:21
  • @jkpieterse seems like office.js tag doesn't exist. the only one I can find is this. and it seems correct from the site you provided Commented Dec 14, 2016 at 21:26
  • @Steve, for the StackOverflow ta, it's "office-js" with a hyphen, not a dot. Commented Dec 15, 2016 at 1:54

1 Answer 1

2

The Office.js APIs don't share any of the COM legacy with the current VBA/VSTO/COM add-in model. It's brand new code, written specifically for cross-platform needs. Where possible (e.g., Excel), the vast majority of this new code is actually shared between Desktop and Online and iOS and Mac. For other host applications, the code itself might not be shared, but we do everything we can to ensure consistency -- and for the new host-specific APIs (Word, Excel, and OneNote namespaces), have been favoring implementing APIs where support can be uniform across all the hosts. That is, if an API says that it's part of ExcelApi 1.3, you can be guaranteed that any of the Excel platforms (Desktop, iOS, etc.) that support 1.3 (Office.context.requirements.isSetSupported('ExcelApi', 1.3) === true) will have all of the APIs that are part of that set.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.