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

419

u/[deleted] May 08 '18

I thought they were going to implement Python?

331

u/GYN-k4H-Q3z-75B May 08 '18

Lowest common denominator. Can't realistically run Python in a browser or mobile apps today. I wish they waited a year longer and built new extension caps on top of WASM. The decision to go with JS will haunt devs for decades to come.

169

u/[deleted] May 08 '18

True that, as much as I hate JavaScript I can understand why some features might be nice for Excel for the same reason JS is good for web-based UI.

But I've also had a mild panic attack because a small part of my job is cracking/reverse engineering some bank calculators that are in excel spreadsheets and the VBA in them is just fucking awful so I imagine the JS is going to be tenfold worse.

67

u/njtrafficsignshopper May 08 '18

Is it easier to write good VB? Genuine question, haven't touched it in ages but my recollection of it is not positive.

168

u/WeRequireCoffee May 08 '18

Its technically possible to write good VBA code. Better chance of getting struck by lightning while being eaten by a shark though (which is also less painful than reverse engineering VBA apps).

78

u/codewench May 08 '18

I've been a .Net developer for nearly a decade, and I can proudly say my VBA is only sort of ass.

Seriously, fuck VBA. The sooner it dies a horrible death, the better.

0

u/[deleted] May 08 '18

[deleted]

→ More replies (2)

42

u/[deleted] May 08 '18 edited May 08 '18

But, I want a GO button in my spreadsheet that takes one input from the cell next to it, and calculates 4 tables of data with 6 charts; each displaying the same result in a different format. THEN I want it to insert that data into [the] database, and then query [the data] so that it shows up on the Summary worksheet.

Edit: oh, and can the summary worksheet look like a webpage using the company branding style? Thanks!

53

u/bagtowneast May 08 '18

I want it to insert that data into [the] database

Jokes on you, the spreadsheet is the database!

5

u/hearwa May 08 '18

Access would like to have a word with you.

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

8

u/firestepper May 08 '18

Also, this needed to be done yesterday...

6

u/ThatDeadDude May 08 '18

Not sure it would have improved code quality, but I wish they had replaced VBA with integrated .net in office years ago.

Now sounds like if they deprecate it it will be in favor of JS 🙁

2

u/meneldal2 May 09 '18

C# is a sane language, JavaScript replacing VBA on the other hand will keep jobs in IT safe for years. They'll have to keep people supporting this for ever.

→ More replies (1)

19

u/leogodin217 May 08 '18

VBA is something we usually learn because we have to. We learn just enough to get things to work, but not enough to enable best practices. I bet that fits probably 80% of us who have ever written VBA. (Glad none of my old VBA code is still around)

7

u/_kellythomas_ May 08 '18

They know, no one used VBA more any more than is strictly necessary:
https://blog.codinghorror.com/mort-elvis-einstein-and-you/

8

u/[deleted] May 08 '18

[removed] — view removed comment

4

u/Confucius_said May 08 '18

Can you provide examples of what you do for sales rep reporting? I use VBA to create 750+ sales rep plan calculators and would love to hear more about the reports your provide.

→ More replies (3)