r/programming • • May 08 '18

Excel adds JavaScript support

https://dev.office.com/blogs/azure-machine-learning-javascript-custom-functions-and-power-bi-custom-visuals-further-expand-developers-capabilities-with-excel
2.4k Upvotes

585 comments sorted by

View all comments

125

u/HadesHimself May 08 '18

I'm not a professional programmer or anything, more of a hobbyist. Can anyone explain why the Microsoft office team has chosen for JavaScript? It seems like a strange choice to me.

So this is essentially to 'replace' VBScript. So then a language like Python would be my first choice? It's popular, has a a simple syntax. While JavaScript is a language that is often criticized and not even designed for stuff liked this. Anyone ELI5?

229

u/[deleted] May 08 '18

JavaScript is arguably the most popular programming language of the time (https://insights.stackoverflow.com/survey/2018/#technology-programming-scripting-and-markup-languages) and Microsoft already have a pretty good JS runtime in Edge that they can use, so I think it makes perfect sense to use JavaScript even though I think there are better languages out there.

71

u/Jacob_Mango May 08 '18

Also with Excel 2019 being UWP only, JavaScript will be the only choice that would be easy to implement and support compared to other scripting languages.

JavaScript is already used with UWP.

JavaScript would probably also work on the mobile devices so better cross compatiblility.

Just a lot of advantages for using JavaScript than any other scripting language.

45

u/[deleted] May 08 '18

Also with Excel 2019 being UWP only,

Not gonna update for like next 10 years then.

25

u/immibis May 08 '18

Because we didn't all say that about 2007.

0

u/[deleted] May 08 '18

[deleted]

8

u/Iceman_259 May 08 '18

there isn't much they can add in a spreadsheet program apart from integrating their other shitty services.

I dunno, they could always try rearranging all the fucking buttons in the ribbon for no good reason.

→ More replies (15)
→ More replies (3)

20

u/Polantaris May 08 '18

and Microsoft already have a pretty good JS runtime in Edge that they can use

If by pretty good you mean a runtime that interprets everything differently than Chrome or Firefox because fuck you that's why, then yes I agree.

IE & Edge debugging are the bane of my existence.

12

u/digitalinfinity May 08 '18

What JavaScript issues do you have in Edge? Please report them over at https://github.com/Microsoft/ChakraCore, we’d be interested in learning more. (I work on the Chakra team)

11

u/[deleted] May 08 '18

I have no problems with Edge. Am I doing something wrong?

IE, though... Yeah, that's a different story.

→ More replies (6)

12

u/save_vs_death May 08 '18

Indeed, the most popular on StackOverflow. Measuring popularity is hard, I'll give you that, but using a website that is visited when you're having problems with your programming is not a good metric.

5

u/[deleted] May 08 '18

Which is why I said arguably. I don't have any better sources so I'll stick to stack overflow. The other points that MS has a good JS runtime and it makes sense if they want to run macros on the web still stands.

7

u/save_vs_death May 08 '18 edited May 08 '18

That I concede completely. To add to that, MS employs a good number of people that deal with JS at various levels of complexity (the JS VM in Edge, the TypeScript team, etc.), whereas, to take Python, or Lua, I don't know how many MS employees are deeply engaged with those technologies.

However, I doubt JavaScript can even break above VBA in popularity (hint: there's a whole world outside the internet).

4

u/[deleted] May 08 '18

If they support typescript in excel, that would be awesome

→ More replies (2)
→ More replies (1)
→ More replies (6)