Question

Do any of you use the javascript macro capabilities of Google Apps, particularly for spreadsheets? How do the capabilities compare? Is there anything that Google Apps can't do that can be done with VBA macros?

Was it helpful?

Solution

The VBA in Office has been the same for about 10 years now, still using old VB6. The limitations of that language are endless. No data structures, no logic short-circuiting, limited types, non-object oriented. Google Apps and javascript are presumably on the forefront of technology and so it should not have many of these limitations.

As for what each is capable of doing that the other can't, that's a little more difficult to assert. I would argue that both languages are more or less turing complete, so while it may be more or less difficult to do something in each language, in theory, a good enough team of programmers could do just about anything in either.

Cheers :D

OTHER TIPS

I am in the middle of conversion of a complex project from VBA to Google Apps Script as an experiment to see what can be done and what can't.

In general, the development environment for google apps script is primitive and frustrating. The language is of course javaScript so if you already know that then you have a head start. The problem though is that many of the advantages of javaScript are not realizable since you don't actually have access to DOM elements, and neither do you have an equivalent of Excel shapes - except through the UI object- which is essentially the same as an excel form, with the same kind of events and objects etc.

Another issue is general slowness. You need to be careful how you structure, so that you minimize calls to the spreadsheet data (I got round this by building a values cache), and scalability is very questionable.

I am equally at home with javaScript or VBA, so putting language aside, VBA is currently more fulfilling and quicker to get things done, although there are increasing capabilities built in to apps script to make it extremely promising.

I am logging the progress of my migration, and the things I come across and the battles to figure out how to minimize structural change (I am trying to see if I can come up with something that would allow dual maintenance on both platforms), so if you are interested, you can follow along here

http://ramblings.mcpher.com/Home/excelquirks/gooscript

Bruce

I'm trying to create charts in google spreadsheet using google apps script and is seems not possible... It is fairly easy in VBA, maybe vb6 is 10 years old but on the other hand you're able to do everything what you need with your spreadsheet. This is not the case in google scripts though.

One of the major hurdles is that Google Apps is web based. Thats were most companies cringe at the thought that you would have your own data not stored securely within your own network. I would never trust Google with that sort of data. I'm sure they have secure data connectors, but why take that risk?

Sure VBA is outdated, and not as sexy as javascript. However, its a great tool for quickly writing small applications, and getting it to the user fast. You only really hear nightmare stories about applications that were built by non-programmers using VBA.

It really depends on your project, and what you want to accomplish. Both have their limitations.

Having taken a quick look at Google Spreadsheet API I get the impression that its currently somewhat limited, for instance:

fewer Events, no control of calculation?, no way of writing UDFs?

Has anyone tried using it for serious work?

By its nature, a Google spreadsheet will not be able to do many things a local program will do. Example: a macro that would import all csv files in a user specified folder and consolidate them.

One thing that springs to mind is that VBA has full access to the WinAPI through 'Declare Function' declarations. Google Apps script won't have this access. This is something to watch for if you're converting a spreadsheet between the two.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top