Live data from Hacker News

Excel Adds JavaScript and Power BI Support

dev.office.com

81–90 of 108 posts

Re: Excel Adds JavaScript and Power BI Support

#81

Earlier quoted context omitted.

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

It's called Jupyter

Jupyter has too much syntax for end users, and its execution model (having to run cells in order to prepare the state for executing other dependent cells) is not intuitive.

Also, installing it is not exactly user friendly. Heck, you have to open a terminal to launch it!

Re: Excel Adds JavaScript and Power BI Support

#82
post #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/e…

Hi, I'm the PM for the feature. Thanks for this feedback about TypeScript support! I totally agree that TypeScript is ideal for this use case.

As other commenters have mentioned, we want to stay flexible for everyone, whether or not they use TypeScript. We'll provide support to make the TypeScript development experience great, like type definition files. You can compile any TS files to JS at development/deployment time (admittedly a little more legwork for your dev environment, yes).

Finally, we'll be releasing an update for Script Lab[1] to support custom JavaScript functions soon. And since Script Lab supports TS we've used exactly the model you suggest above to define the function metadata in Script Lab.

-Michael

[1] https://github.com/OfficeDev/script-lab/blob/master/README.m...

Re: Excel Adds JavaScript and Power BI Support

#83

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.

As the PM for this feature I'm happy to answer that it works in Excel Online starting today in the developer preview!

Right now developers have to sideload the add-in manually. But when the feature ships publicly, the add-in that has the custom JS functions will be deployed to a "catalog". The various Excel platforms (like Excel for Windows, Mac, and Excel Online) will all be able to access that catalog automatically to run the same functions because a pointer to the add-in gets persisted in the xlsx file.

That's a little different from VBA UDFs, which get stored in the file itself. But one advantage of our new model is that it will be way easier for organizations to manage and maintain their JS functions, compared to VBA.

Re: Excel Adds JavaScript and Power BI Support

#84

Earlier quoted context omitted.

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.

As the PM for this feature I'm happy to answer that it works in Excel Online starting today in the developer preview! Right now developers have to sideload the add-in manually. But when the feature ships publicly, the add-in that has the custom JS functions will be deployed to a "catalog". The various Excel platforms (like Excel for Windows, Mac, and Excel Online) will all be able to access that catalog automatically…

As the PM can I beg you to look again at Python built in to replace VBA?

Re: Excel Adds JavaScript and Power BI Support

#85
post #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/e…

Hi, I'm the PM for the feature. Thanks for this feedback about TypeScript support! I totally agree that TypeScript is ideal for this use case. As other commenters have mentioned, we want to stay flexible for everyone, whether or not they use TypeScript. We'll provide support to make the TypeScript development experience great, like type definition files. You can compile any TS files to JS at development/deployment ti…

I'm the kind of person this is directly aimed at, finance background, Excel officionado begging for a better scripting language. I can tell you that I am not interested in js for Excel one bit. Python for Excel however...

Re: Excel Adds JavaScript and Power BI Support

#86

Earlier quoted context omitted.

Any reason you can’t just use TS and compile to JS?

That's not realistic unless you don't plan on maintaining the code. Even if you do have a process to constantly move compiled Javascript into Excel, let's say you lose a minute each time (which is really generous as the code grows). Assuming you make 60 changes a month, you could lose 12 hours of time per year just because TS support isn't built into Excel.

I think there's also a case for supporting every other language that compiles to JavaScript, since users of these languages will also lose 12 hours per year.

Actually, every other language in the world besides JavaScript should be supported.

Re: Excel Adds JavaScript and Power BI Support

#87

The real story here is being able to use D3 in Excel. My prayers have been answered. We truly are living in the future (except in the office, where we're stuck with Excel 2010)

D3.js requires a DOM, and most visualisations require a DOM and SVG rendering. I doubt MS are implementing a DOM or SVG support inside Excel (I could be wrong).

Re: Excel Adds JavaScript and Power BI Support

#88
post #87

The real story here is being able to use D3 in Excel. My prayers have been answered. We truly are living in the future (except in the office, where we're stuck with Excel 2010)

D3.js requires a DOM, and most visualisations require a DOM and SVG rendering. I doubt MS are implementing a DOM or SVG support inside Excel (I could be wrong).

Most visualizations can actually get by with just canvas. No need for the DOM.

Re: Excel Adds JavaScript and Power BI Support

#89

Earlier quoted context omitted.

Hi, I'm the PM for the feature. Thanks for this feedback about TypeScript support! I totally agree that TypeScript is ideal for this use case. As other commenters have mentioned, we want to stay flexible for everyone, whether or not they use TypeScript. We'll provide support to make the TypeScript development experience great, like type definition files. You can compile any TS files to JS at development/deployment ti…

I'm the kind of person this is directly aimed at, finance background, Excel officionado begging for a better scripting language. I can tell you that I am not interested in js for Excel one bit. Python for Excel however...

I can't agree enough. Python baked in would be a dream come true.
Post reply on HN