For users using Excel 2016 or later, the add-in has an Excel Funfun add- in that actually allows you to write and run JavaScript code directly in Excel. And of course, your JavaScript code also has access to data stored in a spreadsheet. Here is a screenshot of how it looks in Excel 2016.

In the middle of the interface, you have a section in which you can write JavaScript, CSS and HTML code. It looks like a playground built into Excel. But Funfun also has an online editor where you can test your code. You can see it in fig. Below. I also posted an example link in the first picture so you can play.
https://www.funfun.io/1/#/edit/5a4e0d461010eb73fe125c4e

What is especially important in the online editor Funfun is that it contains a "table", like Excel. Although you cannot format at all, you can copy your data into cells and check your code directly.
To use the data stored in the spreadsheet, all you have to do is write some configuration in the short.io Funfun file to tell JavaScript about which area in the spreadsheet contains your data. For example, in the example above, all you need to write is
{ "data": "=A2:B9" }
And the JavaScript code uses an object called $ internal to read data. Therefore, to read the data stored in A2: B9, you need to write
var data = $internal.data;
And everything is done. You can go to the Funfu documentation if you want to know more.
If you are satisfied with the result achieved in the online editor, you can easily download the result in Excel using the above URL. First you need to insert the Funfun add-in from Insert - My Add -Ins. Here are some screenshots showing how you could do this.


Disclosure: I'm a Funfun Developer
source share