Live data from Hacker News

Excel Adds JavaScript and Power BI Support

dev.office.com

41–50 of 108 posts

Re: Excel Adds JavaScript and Power BI Support

#41
post #22

Earlier quoted context omitted.

I'm thinking of all the places where I've seen Excel used in operations. Often it's the only software the company uses. Now we're going to get people who've done a little javascript in college using it to elaborate the Spreadsheet That Runs Our Business. In all likelihood, the resulting chimera will make an impenetrable tangle of VBA and Javascript.

And if that works for the business... then where's the problem?

Javascript's concatenation and equality rules alone likely will lead to your first premise being incredibly false.

Re: Excel Adds JavaScript and Power BI Support

#42
post #5
post #2

But no Python support as they promised. So sad.

If that's true, this stuff just changed the world more than half of the political issues that people march on streets about. The brightest people in office jobs around the world that aren't well integrated with developer teams (almost all of them) just got pushed to learn javascript, puke.

I get the appeal of "DAE hate JS" on Reddit where everyone upvotes you, but it seems out of place on a forum of professionals because JS is not much different than other dynamically-typed languages. I'd say it's better than Python which doesn't have async-by-default nor idiomatic closures. But "puke" is a bit childish.

Re: Excel Adds JavaScript and Power BI Support

#43

Earlier quoted context omitted.

I'm thinking of all the places where I've seen Excel used in operations. Often it's the only software the company uses. Now we're going to get people who've done a little javascript in college using it to elaborate the Spreadsheet That Runs Our Business. In all likelihood, the resulting chimera will make an impenetrable tangle of VBA and Javascript.

So, when are you developers going to build an End-User Development platform with decent engineering practices, to replace Excel for business users?

Agree. The choice isn't between spaghetti VBA and clean code, it is between spaghetti VBA and business users doing more copy-paste and manual work. It's not economical to have a professional development team looking at every single task that needs to be automated in a business.

Re: Excel Adds JavaScript and Power BI Support

#44
post #2

But no Python support as they promised. So sad.

One issue with embedding Python is that it's difficult to sandbox - to securely limit what the embedded runtime, and hence (potentially malicious) custom functions, can do:

> [The Python developers'] standard answer to "How do I sandbox Python code?" has been "Use a subprocess and the OS provided process sandboxing facilities" for quite some time. [1]

JavaScript, OTOH, is designed to support secure in-process sandboxing. Other languages with such support do exist (e.g. Lua), but JavaScript is by far the most widely known.

[1] https://mail.python.org/pipermail/python-dev/2013-November/1...

Re: Excel Adds JavaScript and Power BI Support

#45

Microsoft has been doing great work in opening up their software the past couple years. For anyone interested in this, I suggest taking some time to read through Microsoft's Office Platform docs [0]. Quite a lot is possible. The plugin API is really clean and you can create javascript plugins for any office product, where you basically run a "website" in a frame within the office product, and the code in the "website…

So my question is how this integrates with their online version of Excel? For example: I build some custom JS based functions in Excel and used them all over my spreadsheet then I upload it to OneDrive and trying to open it in online Excel form, will it work? That is key for someone like me who creates sheet offline but then wants to consume the data via online version.

I think the answer to that is probably in the docs, but IIRC it’s possible as long as your JS code is hosted publicly with a valid cert. Not sure though, don’t quote me on that.

Re: Excel Adds JavaScript and Power BI Support

#46
post #30

Earlier quoted context omitted.

VBScript is not VB6

VBScript isn't a scripting language of Excel. VBA is VB6 embedded in Office. https://en.wikipedia.org/wiki/Visual_Basic_for_Applications

Been so long I'd blocked it out. Thanks :-)

Re: Excel Adds JavaScript and Power BI Support

#47
A bit surprised that there's no TypeScript support, especially considering how verbose metadata you have to write as a result[1]. That whole thing could be made much simpler with some TS and JSDoc, eg.

    /**
     * adds 42 to the input number
     * @param a the first number to be added
     * @param b the second number to be added
     */
    function ADD42(a: number, b: number): number {
      return a + b + 42;
    }
[1] https://docs.microsoft.com/en-us/office/dev/add-ins/excel/cu...

Re: Excel Adds JavaScript and Power BI Support

#48
post #5

Earlier quoted context omitted.

If that's true, this stuff just changed the world more than half of the political issues that people march on streets about. The brightest people in office jobs around the world that aren't well integrated with developer teams (almost all of them) just got pushed to learn javascript, puke.

I get the appeal of "DAE hate JS" on Reddit where everyone upvotes you, but it seems out of place on a forum of professionals because JS is not much different than other dynamically-typed languages. I'd say it's better than Python which doesn't have async-by-default nor idiomatic closures. But "puke" is a bit childish.

I'd kind of assume everyone on HN has made their minds up about languages and I'm not qualified to change the opinions of any of them or even really try to be informative. So the puke is just for the (70% at a guess?) people who would agree that this is a bad choice.

Since I work with both python and javascript in exactly this dirty moving data around for analysts space (but haven't for long), I'll qualify a bit.

The most important point is that python absolutely brutally dominates the data science space, there are no javascript equivalents to the python ecosystem, it's not even close.

Secondary point is that javascript is much lower level than python in a language sense. Python already has classes built in, reflection, sane typing, just tons of batteries.

Javascript as someone smarter than me said before is lisp with C syntax. It's definitely possible to build a good language out of Javascript by using the right libraries and making decisions on how you're going to implement inheritance etc but it's just tons harder than python or almost any other language which has defaults on these decisions made for you. Guys automating their data flows aren't going to be at the level to make these decisions well but they will run into the same problems they solve and implement their own insane schemes.

I'd much much rather debug amateur VBA or Python than amateur javascript.

Re: Excel Adds JavaScript and Power BI Support

#49

Earlier quoted context omitted.

I'm thinking of all the places where I've seen Excel used in operations. Often it's the only software the company uses. Now we're going to get people who've done a little javascript in college using it to elaborate the Spreadsheet That Runs Our Business. In all likelihood, the resulting chimera will make an impenetrable tangle of VBA and Javascript.

So, when are you developers going to build an End-User Development platform with decent engineering practices, to replace Excel for business users?

Might as well ask the people running a mom and pop store in Podunk when they're going to unseat Amazon.

Re: Excel Adds JavaScript and Power BI Support

#50

Earlier quoted context omitted.

I'm thinking of all the places where I've seen Excel used in operations. Often it's the only software the company uses. Now we're going to get people who've done a little javascript in college using it to elaborate the Spreadsheet That Runs Our Business. In all likelihood, the resulting chimera will make an impenetrable tangle of VBA and Javascript.

So, when are you developers going to build an End-User Development platform with decent engineering practices, to replace Excel for business users?

> replace Excel for business users

Not likely. Given the depth and breadth of its penetration, all the man-millenia that have been spent encoding business rules in Excel, I suspect that in the end Excel will outlive Windows itself, just as COBOL has outlived the mainframe era.

I'd love to see a principled approach to extending Excel, and maybe MS have already done it. There are a lot of ways to extend Excel, and given the MS practice of keeping backwards compatibility alive for decades, none of them is going away any time soon. Could be one of them is actually good. I just today learned about Power Query M, which looks promising.

Post reply on HN