Live data from Hacker News

Excel Adds JavaScript and Power BI Support

dev.office.com

51–60 of 108 posts

Re: Excel Adds JavaScript and Power BI Support

#51

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?

It's called Jupyter

Re: Excel Adds JavaScript and Power BI Support

#52
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 sandbox…

I think this is the real reason why we will never see Python inside Excel. The other, minor, reason is that Guido has pretty much pooped all over the idea of backwards compatibility in Python, which is pretty much integral to Microsoft's vision.

Re: Excel Adds JavaScript and Power BI Support

#53
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 sandbox…

Other benefit is the web version can potentially run the javascript in the browser instead of waiting for a network call. Not sure what the security implications are here.

Re: Excel Adds JavaScript and Power BI Support

#56
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…

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

Re: Excel Adds JavaScript and Power BI Support

#57
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 sandbox…

Didn't and doesn't stop them from using VBA, which of course is already used by malicious entities everywhere, so if they're unwilling to stop supporting that then why not let unsandboxed python work?

Re: Excel Adds JavaScript and Power BI Support

#58

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.

God forbid someone will figure out how to plug NPM into Excel-JS, and the bloat from the web will get ported into business spreadsheets as well. (I guess that's one way to drive new hardware sales, though.)

It's too late. We're all doomed.

https://docs.microsoft.com/en-us/office/dev/add-ins/tutorial...

Step 1 in the official Excel Add-Ins tutorial includes installing Node and npm.

Re: Excel Adds JavaScript and Power BI Support

#59
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…

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.

Re: Excel Adds JavaScript and Power BI Support

#60
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…

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

If you look at their example, the "type information" is actually encoded in an ancillary JSON file: https://github.com/OfficeDev/Excel-Custom-Functions/blob/mas...

In theory, you could embed all of the metadata in JSDoc + TS annotations.

Post reply on HN