Slashdot Mirror


Microsoft Adds Support For JavaScript Functions in Excel (bleepingcomputer.com)

An anonymous reader shares a report: At the Build 2018 developer conference that's taking place these days in Seattle, USA, Microsoft announced support for custom JavaScript functions in Excel. What this means is that Excel users will be able to use JavaScript code to create a custom Excel formula that will appear in Excel's default formula database. Users will then be able to insert and call these formulas from within Excel spreadsheets, but have a JavaScript interpreter compute the spreadsheet data instead of Excel's native engine. "Office developers have been wanting to write JavaScript custom functions for many reasons," Microsoft says, "such as: (1) Calculate math operations, like whether a number is prime. (2) Bring information from the web, like a bank account balance. (3) Stream live data, like a stock price."

5 of 171 comments (clear)

  1. I'm listening... by MightyYar · · Score: 3, Interesting

    This could be good, if they handle errors well. If they use the same default "fail silently" practice as they do with VBA functions, then it will be just as dangerous as those are.

    --
    W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
  2. Re:Yes by Anonymous Coward · · Score: 5, Interesting

    There is a huge group of computer-using professionals that live and breathe Excel.

    They are not programmers. But they do have script-kiddie level of competence, which they use for making Excel formulas and macros.

    These people are in love with Excel, and when they submit requirements for actual software development, they adamantly insist that the software accept Excel documents as input, and that everything the program does be controlled by Excel.

    This creates terrible inefficiency, gobbles up memory, slows the system down, injects an endless stream of bugs and support issues, and lets utterly unqualified people inject code into complex systems with little-to-no insight as to what-all is going to break because of it. But if you try to convince them to allow you to implement some of that logic in a proper coding language, they flatly refuse.

    So, of all the programming languages that are common in the industry, which one is most likely to be one that this class of user has encountered, tampered with, and prefers?

    Of course javascript. One of the Internet's oldest mistakes, and one of the worlds most sloppy and dangerous tools, will be put into the hands of non-programmer power-users to use right in the center of complex mission-critical systems that directly impact things like....oh I dunno....large sums of money moving around.

    The world is run by the wrong people.

  3. No, not JavaScript! by null+etc. · · Score: 4, Interesting

    Good God, of all languages, why JavaScript? JavaScript is a terrible programming language! And its floating point math is bonkers, have you ever tried doing 0.1 * 0.2 in JavaScript, the answer is 0.020000000000000004! Can you imagine how main spreadsheet errors this will cause?

    And JavaScript doesn't even have type safety! If Microsoft were smart, they would use a compiled programming language, like C, that you'd have to compile using a command-line compiler with a GPG-Key that you could inspect to avoid government MITM attacks! Now the government can get your tax spreadsheet information!

    And, JavaScript is terrible because a lot of popular JavaScript frameworks have their own package managers! Can you imagine developers BLINDLY TRUSTING whatever package and whatever dependencies it has? Every developer should be forced to only use the OS package manager to install JavaScript libraries!

    And, JavaScript is terrible because hundreds of programmers release hundreds of new packages every day, and they grow old and stale and now the JavaScript package ecosystem is older and staler and more crowded than the iOS app store ecosystem!

    And, JavaScript is terrible because anyone can just pick it up and start playing with it, and they can write a web server in 15 minutes without even knowing about tail recursion or Monte Carlo cyclomatic complexity reduction! Script kiddies will start taking our jobs, and they don't even have to know how to covert an AST optimization into a stack heap implementation!

    I hope that Microsoft realizes the error of their ways, and instead implement something like LISP as the programming language.

  4. When will they learn? by zarmanto · · Score: 4, Interesting

    Microsoft has added various scripting languages to their Office products over the years... and each and every one has been abused by bad actors at some point, forcing Microsoft to cripple and/or remove the capability. What on earth could possibly make Microsoft think that adding JavaScript to Office documents will be any different? Particularly since it has already been abused in a myriad of ways within web browsers??

    As the old saying goes, "The definition of insanity is doing the same thing over and over again, and expecting different results."

  5. Not the Excelent Excel Object Model by aberglas · · Score: 3, Interesting

    No, it does not use the Excel Object Model.

    The Excel Object model is actually very good. Sensible and clean (ignoring recent horrors like the ribbon). COM is a mess, but the object model is excellent.

    Moving to JavaScript does not merely men replacing End If with {}. The JavaScript model runs in a client server style, with futures etc. Much, much more complex. That is the essence of the change, Not the actual language.

    10 lines of VBA becomes 100 lines of the new Java API. And is impossible for non-programmers to write. And that is what VBA supports, non programmers.

    In VBA you can even record a macro, see the object handling, and then tidy it up afterwards. Excellent.

    What actual users of Excel want is the VBA to be properly supported. It was abandoned for .Net, which was unusable by non programmers and very difficult to deploy. And now the fashion is Javascript. But since when to developers listen to uses? Wot's hot and wot's not. That is what counts.