I'm working on a project to upload data to a db from excel files. This is in vuejs. The plan is to also develop an in house excel web addin using office/excel js library.
So my question is:
Is it possible to just develop the web app and then later add the ability to load as an excel addin? This would be so that I can work with one codebase rather than two.
Looking in the docs/ guide (https://learn.microsoft.com/en-us/office/dev/add-ins/quickstarts/excel-quickstart-vue) I guess there is no reason why I cannot load the below into a specific component which is loaded on demand and is only an allowed page when the office.js script tag loads correctly.
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js"></script>
window.Office.initialize = () => {
new Vue({
render: h => h(App)
}).$mount('#app');
};
Anyone with some experience of this in either react/ angular/ vue might be useful
Thanks in advance!
Yes! This is possible, in the exact way that you're describing it. Because modern office add-ins are build with HTML, JS and CSS, it's really no different than any other web app.
I'd encourage you to think of a few things before taking this road through; likely to save you some time down the line.
All in all - one codebase, two apps is possible.