11

Sorry if the title is very vague, I've been trying to work my way around this for a little while now, but I have to say that I know very little about Office 365 and its abouts.

I've developed a series of macros in Excel 2010 that include input of data and automation of subprocesses, but recently we've been told that we're more definetely moving to the Online platform of Office 365, and as you already know, Excel online does not supports macros -or any VBA really, as far as I know.

So I was wondering if there was another way to make it work? I'm open to any ideas at this point!

Thank you in advance!

Valeria Noble
  • 151
  • 1
  • 1
  • 8
  • 1
    The best solution seems to be to maintain a regular version of Excel installed directly on the PC, in which you can open those files to run those macros. You can open and edit the files in the Online version, without corrupting or deleting the macros, but you will not be able to use them in any way. You can probably make a business case to your employers about the productivity loss, and maybe they'll keep a single license available for you. – Joseph Mason May 17 '18 at 20:40
  • 2
    Look into [tag:office-js] - happy porting! – Mathieu Guindon May 17 '18 at 20:43
  • Yeah, Mathieu has it right, the future is javascript based apps. I second his comment. – S Meaden May 17 '18 at 20:47

1 Answers1

24

[...] we've been told that we're more definetely moving to the Online platform of Office 365, and as you already know, Excel online does not supports macros -or any VBA really

That is correct. VBA is a COM technology that has a lot of dependencies on Windows-specific things. That Microsoft managed to get it to run on Mac is rather impressive already, and I'm not even mentioning the fiendishly complex work of making a workable Mac-VBA editor.

VBA will be supported on Windows desktop for the foreseeable future, but making it work on all the platforms Office 365 runs on is simply unrealistic, and isn't going to happen.

Is that the death of VBA? Of course not. Microsoft knows there are millions of business-critical macro-enabled worksheets out there running VBA code, and as far as I know VBA will definitely keep being supported on Windows.

If your company is moving to Office 365 cloud, then your VBA code needs to be ported/rewritten in TypeScript, using , from scratch: that should have been a cost that was factored into the decision to go all-web. If your company isn't prepared to have all VBA code ported, then depending on how business-critical the VBA code is you'll want to keep a desktop install for the workstations that need to run VBA code.

The Microsoft Office Extensibility team is actively monitoring the tag on SO, Michael being the top answerer in that tag.

You'll probably want to get into the insider program to benefit from the latest bug fixes and new features, as Office-JS is under very active development, and user feedback is absolutely welcome and taken into account.

Disclaimer: I'm a Microsoft Excel MVP.

Mathieu Guindon
  • 69,817
  • 8
  • 107
  • 235
  • Thank you so much! this points me towards exactly what I was looking for. – Valeria Noble May 17 '18 at 21:49
  • 1
    I've just checkd the office-js api and I think it is awful. MS should ask Google how to create a such things. The VisualStudio web-add-in template project is huge for something that isn't actually doing anything yet. A nice idea but not really useful. I can't imagine using it anytime soon with that much overhead. – t3chb0t May 10 '20 at 14:20
  • Great post. It helps to understand the new move from microsoft. Can office scripts be executed programmatically like the way we could execute macros through vba? – Andy Dufresne Jun 04 '20 at 15:36
  • 2
    @AndyDufresne I'd have to toy with it much more than I have, but while ScriptLab seems limited to a fully-customizable *task pane* to launch macros from, Office Scripts seem more robust and flexible... but also much more complicated to setup. Since I extend the VBE rather than Excel itself, this is all of limited use to me personally... but, it's all TypeScript so presumably if a function is in scope, it can be invoked, yes. But I don't know whether or how thoroughly (vs VBA) it can integrate with Application, Workbook, and Worksheet events. – Mathieu Guindon Jun 04 '20 at 15:43
  • @MathieuGuindon - thanks for the follow up. Since we want to achieve programmatic execution I was looking for a rest api that allows me to call the office script. I [could not find it](https://learn.microsoft.com/en-us/graph/api/resources/excel?view=graph-rest-beta). Could you elaborate please on what you meant by "if a function is in scope, it can be invoked"? Note I don't want to use any VBA code for this execution. What are the options of programmatic invocation of the office script? Thanks ! – Andy Dufresne Jun 08 '20 at 05:41