Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel JavaScript API file-system interactions, system calls, and API calls?

I'm in the process of writing an Excel add-on using the Excel Javascript API.

I'm wondering about three things:

  1. If the add-on is running on desktop Excel, then can the add-on interact with the file-system of the local machine?
  2. If the add-on is running on desktop Excel, can it make system calls? I'm looking to move some files around, and maybe call some installed packages.
  3. Finally, can the add-on send sheet data (or even the entire sheet) to an external API? More generally, can the add-on send arbitrary data to a some server?

If you're feeling generous with information, it'd be awesome to understand which of these capabilities are possible with the VSTO Add-ins as well.

Thanks in advance for the help - it's greatly appreciated!

like image 958
Nate Rush Avatar asked Sep 12 '25 09:09

Nate Rush


1 Answers

I don't know about VSTO add-ins, but for web add-ins that use the Office JavaScript library:

  1. No. The add-in is a web application running in what is, in effect, a browser embedded in Excel. For security reasons, web apps cannot access the device's file system (except for certain constrained actions, such as saving cookies).
  2. No. Same as #1, web apps aren't allowed to do this.
  3. Yes, the web app can call out to any endpoint on the Internet and send data. You can, for example, read Excel data and pass it as the payload in a call to a REST API.
like image 68
Rick Kirkham Avatar answered Sep 15 '25 02:09

Rick Kirkham