562 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owls only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Coding in SQL, Python, VBA, JQuery and OfficeScript using AI tools
Part six of an eight-part series of blogs
One of the immediate and obvious ways to use AI tools is to boost your productivity as a programmer. This blog shows how you can use ChatGPT 4 and Google's Bard to write programs in SQL, Python, VBA, JQuery and Office Script (probably the 5 languages Wise Owl use most).
Nearing the end of our marathon AI coding session, the Office Script question I thought we'd ask is:
Write an OfficeScript program to loop over all of the worksheets in a given workbook, counting the number of active cells in each and presenting this information in a table in a separate workbook
This is a nice simple request, but I'm expecting that the answers won't be as good as for other languages due to the absence of training material out there. Let's find out!
I was expecting ChatGPT to struggle with Office Scripts, but (as so often) was flabbergasted at how good its reply was. It began with a little history lesson:
The first paragraph of this is no longer true - Office Scripts also work in the desktop version of Excel - but the disclaimer does say that the information might be out of date.
Here's the script created:
I don't claim to know Office Scripts as well as my colleague Andy Gould, but this answer looks highly plausible to me (and the explanation of how it works at the end is excellent).
I thought Bard might struggle with this (it is after all a Google tool, and must have some bias towards Google Scripts?), but I didn't think it would make up syntax!
I am no Office Scripts expert, but I'm pretty sure that the getActiveCellCount function only exists in the imagination of Bard.
Once more Bard has taken much less time to arrive at what is superficially a perfectly plausible answer, but with coding (almost more than in any other field of human endeavour) the devil is in the detail!
|Parts of this blog|
25 Aytoun Street