Reputation: 11963
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)
Upvotes: 0
Views: 187
Reputation: 8670
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.
Upvotes: 2