I'm developing an office-js add-in that needs to run automatically (without user interaction) every time any Excel document starts. I have configured it to use a shared runtime. This capability exists for VSTO add-in which load when Excel starts but seems to be missing for Office-js addins.
I only found two possible solutions, but they don't work that well:
Office.addin.setStartupBehavior(Office.StartupBehavior.load)
so that the add-in loads automatically for the document.Issue: the add-in needs to be manually inserted once (the user needs to click on the add-in ribbon once per document). This setting only applies to the current document. Not practical since users first need to interact with the add-in for every new document.
Issue: Excel blocks I/O for documents as they are opened. For local documents, I found a way to write onto them as Excel writes on them, but when the documents are saved on OneDrive, any stream with ReadWrite attributes can't get access. So this solution is not working very well.
Is there a workaround possible?
No, there is no other way to get Excel web add-ins loaded automatically.