3 ms·
Microsoft has been doing great work in opening up their software the past couple years. For anyone interested in this, I suggest taking some time to read throug
by chatmasta 9y ago
Microsoft has been doing great work in opening up their software the past couple years. For anyone interested in this, I suggest taking some time to read through Microsoft's Office Platform docs [0]. Quite a lot is possible. The plugin API is really clean and you can create javascript plugins for any office product, where you basically run a "website" in a frame within the office product, and the code in the "website" has access to the office API.
I haven't used it myself yet but am planning on using it in a project I'm working on currently. I'm building a questionnaire creator that can auto merge into docx files by using comments as merge keys (you highlight where you want to merge and leave a comment, then in the web UI where you build the questionnaire, you associate each form field with a comment in the uploaded docx file). At some point I would like to convert this to use the office API, which would enable a lot of cool features for converting a docx form into a questionnaire.
[0] https://msdn.microsoft.com/en-us/office/office365/howto/platform-development-overview https://msdn.microsoft.com/en-us/office/office365/howto/plat...
- gordon_freeman 9y agoSo my question is how this integrates with their online version of Excel? For example: I build some custom JS based functions in Excel and used them all over my spreadsheet then I upload it to OneDrive and trying to open it in online Excel form, will it work? That is key for someone like me who creates sheet offline but then wants to consume the data via online version.
- chatmasta 9y agoI think the answer to that is probably in the docs, but IIRC it’s possible as long as your JS code is hosted publicly with a valid cert. Not sure though, don’t quote me on that.
- toyg 9y agoAfaik the API is the same, if anything the online version gets updates earlier than installed counterparts. So yeah, it should work from the web too. There might be additional checks if you package your solution as a proper add-in (it might have to be enabled by an O365 admin).
- msaunders77 9y agoAs the PM for this feature I'm happy to answer that it works in Excel Online starting today in the developer preview! Right now developers have to sideload the add-in manually. But when the feature ships publicly, the add-in that has the custom JS functions will be deployed to a "catalog". The various Excel platforms (like Excel for Windows, Mac, and Excel Online) will all be able to access that catalog automatically to run the same functions because a pointer to the add-in gets persisted in the xlsx file. That's a little different from VBA UDFs, which get stored in the file itself. But one advantage of our new model is that it will be way easier for organizations to manage and maintain their JS functions, compared to VBA.
- jimnotgym 9y agoAs the PM can I beg you to look again at Python built in to replace VBA?
- govert 9y agoIt would be wonderful if it were possible to integrate with this 'pointer' mechanism in a custom way for .xll add-ins too, like those made in C/C++, .NET (with Excel-DNA), Python (with PyXLL) or D (with excel-d)? There's a huge ecosystem of Excel add-ins that could benefit by access to just a few of the hooks being build for the JavaScript support.