I've spent the last two weeks getting my Office JS Add-In dev environment setup, what a pain! Before I keep spending more time on it, I wondered if the Office JS can even do some of the things I need to replace my VBA Add-Ins.
Things include:
xlsx or Excel just opens the spreadsheet. I currently have two macros for this, one finds the file on the FileSystem and imports it, the other, finds the Excel instance (separate from the open/existing instance) and imports the spreadsheet. I have a feeling Office JS can't do either of these, but I can possibly look into converting these to scraping, but I'm not 100%.The reason I'm looking to port away from VBA is I don't think Corp likes the idea of investing in VBA, for one, its hard to find/hire VBA Devs and another is its all "unsupported" though I've got my deployment 100% figured out. If I could host Add-Ins via official channels in a "normal" programming language, they might be more interested, but I'm unsure if Office JS is the way to go?
Thanks for the input!
Looking at your points covered in the post you really need to develop a COM add-in, not a web add-in. You can easily port your VBA macros to VSTO based add-ins where you could be using a "normal" programming language of your preference (I personally prefer using C# for COM add-ins).
There is no "automatic conversion", although to a certain extent you can copy/paste the procedures then "tweak" them for their new environment. Certainly, the simplest is to use VB.NET to create the VSTO project, rather than C#. That's because VBA and VB.NET have a similar syntax.
Then you need to decide whether you want an add-in, or a document-specific project.
Finally, you may find the Extend Your VBA Code With VSTO article helpful.