r/OfficeJs • • Jul 19 '24

Waiting on OP Office.js Future

7 Upvotes

Hello, I have been using VBA for few years, and 2 months ago I started learning Excel.js. I honestly love it , so much that I have completely given up on VBA. Using VS-Code I can make my own add-in and I'm very very impressed.

However when searching about topics on the internet I see many posts that are always 3-4 years old. It is like there was a peak interest in 2020 ? But since then, I see less and less posts on forum, news etc . And i'm wondering , what is happening ? Is it dying ?
Or people prefers power Bi to excel ( which are completely different by the way) ?

Microsoft is investing a lot in office.js with regular updates but I feel the audience is not there ..
What's your feeling people ?
Thanks


r/OfficeJs • • May 03 '21

Waiting on OP Two different APIs?

7 Upvotes

Maybe I don't fully understand, but there seems to be two different APIs being developed: The Excel Javascript API used in add-ins, and the Office Scripts API used in Excel for Web. Can someone help me understand what's happening here?

Microsoft docs on each one:

Excel JavaScript API overview - Office Add-ins | Microsoft Docs

Office Scripts API reference - Office Scripts | Microsoft Docs


r/OfficeJs • • Oct 29 '25

Waiting on OP office.js CDN down

5 Upvotes

Hi everyone, it looks like the official office.js CDN is currently down. (https://appsforoffice.microsoft.com/lib/1/hosted/office.js)

Does anybody know of any non-official CDNs that host it? Or does it have to be on a Microsoft domain.


r/OfficeJs • • Feb 13 '22

Discussion Excel custom functions JSON metadata file should not be cached permanently

5 Upvotes

Currently, Excel will permanently cache an Add-in's custom functions JSON metadata file. This happens when the Add-in is first added to Excel.

But the JSON metadata file may be updated from time to time for various reasons. It could be as trivial as correcting a typo in a custom function's description. Or it could be as serious as adding a new custom function altogether. Regardless, Excel currently doesn't fetch the new JSON file.

The only ways to get Excel to fetch the new JSON file appear to be:

  1. Submit a new XML manifest to AppSource with a new version number, even though the rest of the manifest are unchanged. This contradicts the AppSource submission FAQ which says we don't have to resubmit if we make changes only to the web service.

  2. Ask users to manually reinsert the Add-in from Office Store.

  3. Ask users to manually clear the Office Cache.

All of the above seems unnecessarily complicated, when Excel could simply respect the HTTP Cache-Control headers returned by the server.

I've opened a GitHub issue and then raised a new suggestion on the Microsoft 365 Developer Platform. But I'm not getting any traction.

I know I'm not alone because there's at least another GitHub issue on the same matter.

Anyone else face the same issue? How did you solve the problem?


r/OfficeJs • • Feb 23 '21

I'm a Product Manager from the Office Scripts team - we're announcing an AMA in r/excel next Tuesday @ 9 am PST!

Thumbnail self.excel
5 Upvotes

r/OfficeJs • • Jun 30 '21

Unsolved Is it possible for an Excel Addin (Javascript) to interact with Office Word?

4 Upvotes

Initially posted this to stack overflow, but wasn't really sure it was suitable there! And I find the website very intimidating lol, but then I found this subreddit, so here I am.

I am very new to Excel Add-ins & Javascript. I want to create an Excel Add-in and have been following some tutorials of example Add-ins beforehand, so I am not at the level where I can actually write my own Add-in in full yet.

One part of the Add-in I want to create is that the user should input data into Excel and then the data can be fed into a pre-made Word template that will then run some (already written) VBA code for processing. Is this possible? I've done some searching and a few experimental scripts in Script Lab as well, but to no success.

My goal was to write in Javascript, but if it is not possible/too convoluted, then I will need to learn VBA (the VBA code that is already written was not written by me). I am hoping this is not the case, as the aim was using Javascript because it is more modern and thought it was functionally the same.


r/OfficeJs • • May 26 '21

Unsolved Grab comments from a Word Document

4 Upvotes

Hey! This sub seems to be a bit quiet, but I hope someone here can help. I am starting to learn and create my own word add in, and I want to create a "summary" app. I want to select a paragraph or two, and manually add a comment to it, and then, run the add in to copy paste all comments to the top of the page. I thought it was gonna be a simple task... but I can't find anything on comments. Does anyone know how I can do it?


r/OfficeJs • • Mar 31 '19

Unsolved Powerpoint Add-in - detect slide change during playback

4 Upvotes

Hi All

Neck deep in my first add-on (new type - HTML / Office.js), for an internal project. The long of the short is when the PPT changes slide I want to slide number to be sent to another application / computer over web-socket. Things are going well, however I'm having trouble finding a good solution to registering a slide change.

I found online a solution that checks the current slide vs a stored index every x milliseconds, however seems quite inefficient. That post was from 3 years ago, so wondering if a better solution has appeared? I did also see VBA will do this, if there's no other way some help getting to and from a VBA script would be amazing.

I'm about to see if a mouse click or button click is ok - but obviously no good for automatic transitions. I'd love a clean solution!

TL;DR - How do I register a slide change and get the new index in JavaScript?

Cheers!


r/OfficeJs • • Mar 17 '25

Unsolved Outlook - Context menus

3 Upvotes

Am I correct in believing that we can't create right-click context menus in an Outlook web add in (as we could with VSTO)?


r/OfficeJs • • Oct 20 '24

Discussion Building an open-source excel document management add-in - good idea?

3 Upvotes

I’ve been working on an Excel add-in as a side project. It helps users interact with documents directly in Excel managing, searching, extracting data, and cross-referencing. It’s mainly aimed at audit, due diligence, and controlling work (see www.docupulse.org)

Rather than commercializing it, I’m planning to transform it to an open-source project with the goal of finding active collaborators and build a platform for users to simply add customized features. Do you think that’s a good idea? Would anyone be interested in contributing or sharing thoughts?


r/OfficeJs • • Oct 17 '24

Solved Office.context.ui.displayDialogAsync causing TrustedScript error

3 Upvotes

Hello,

I created an Office JS add-in for Outlook. The add-in displays a popup dialog. However, I'm seeing this error in the JS console and the content of the dialog box never loads:

[Report Only] This document requires 'TrustedScript' assignment.

Here is the dialog box:

Office.context.ui.displayDialogAsync('https://{website}/test.html',
    {height: 30, width: 20, promptBeforeOpen: false, displayInIframe: true}
);

What might be the cause of the error? The website is on the same URL as the code that hosts the add-in.


r/OfficeJs • • May 27 '24

Waiting on OP Shared Javascripts object instances in commands.js and Taskpane ?

3 Upvotes

Anyone knows if its possible to share javascript object instances between javascript functions in command.js (called from word when the user clicks a context menu) and javascript running in the taskpane.

We have configured our Office Addin (Word) to be using a SharedRuntime - but it seems that the javascript runtimes executing are different - hence we cannot share object instances ?


r/OfficeJs • • Jun 19 '23

Waiting on OP Uploading an Office Add-In as an Individual Developer

3 Upvotes

I'm an individual developer without a registered company and I've created an office add-in, but I'm facing difficulties uploading it to AppSource, the online add-in store. They require a company name and ownership verification. Is there a way for individual developers to upload their office add-ins? Any guidance or suggestions would be greatly appreciated. Thank you!


r/OfficeJs • • Nov 30 '22

Discussion Pyodide (Python in Excel)

3 Upvotes

Hi, I was just stumbling around getting ready for Advent of Code this year, which I want to do in Excel. I'm pretty familiar with VBA so I'm going to try not to use it. Here's my approach for the puzzles: First I'll try to solve it using LAMBDA functions and the Advanced Formula Environment. Then I'll try Office Scripts through the new Automate tab, or on the web. Finally, I was planning to resort to VBA, but then I realized I have Script Lab.

I was playing around in Script Lab and it seems to be a bit more powerful than Office Scripts. Then I realized something incredible: it's possible to import and use pyodide in Script Lab. I was able to load it up and print a python command to the console. For those that aren't familiar, pyodide is the full scientific python stack compiled to web assembly. I know from playing around at Starboard.gg that python functions/objects can be registered to javascript and vice versa. So this got me thinking, is there any technical hurdle to an add-in that contains a full pyodide REPL that interacts with Excel? Anybody here interested in getting an open-source project started?


r/OfficeJs • • Aug 05 '20

Discussion Office JS graphs with D3

3 Upvotes

Is it possible? I designed a graph using D3.js and svg/html/css markup for power bi and then found its more suitable for excel.


r/OfficeJs • • May 22 '20

Unsolved Reset drop down menu in Excel using Office.js

3 Upvotes

I'm new to Office.js and need help with resetting the values of drop down menus in Excel based on the value of another cell. I have a basic VBA script that does this now but I need it to work on iOS and Android versions of Office. Is anyone experienced with this type of thing in excel, and is it even possible with Office.js?


r/OfficeJs • • Sep 18 '18

ProTip Script Lab Demo [Video]

Thumbnail
youtube.com
3 Upvotes

r/OfficeJs • • Feb 17 '25

Unsolved Office.context.ui.displayDialogAsync can't communicate with the open dialog once the taskpane is reloaded

2 Upvotes

is this a known issue? so the scenario is like this

  1. open dialog using displayDialogAsync api from the taskpane

  2. reload/refresh the taskpane window. (press F5 or rightclick then refresh)

  3. try to communicate with the open dialog and will throw the error

Office.context.ui.messageParent is not a function

can you please help me? I feel like it is an OfficeJS issue, but could not find any filed bug. Thank you!


r/OfficeJs • • Dec 12 '24

Unsolved Is it possible to launch a taskpane add-in automatically when users open an email?

2 Upvotes

Same as the title, I have this usecase where some background tasks (API calls) need to be made per email. So the goal here is to minimize the number of clicks the outlook user need to make, to perform those tasks. I already have a regular taskpane add-in built, where users open up an email -> clicks on the add-in -> background tasks are performed. Just need to get rid of one extra click to open up the widget.


r/OfficeJs • • Jul 28 '24

Unsolved How to navigate between taskpanes?

2 Upvotes

Hi all, I'm super new to this and had some noob questions.

I'm following the "Git the Gist" tutorial from the offical docs, now just playing with it to get a hold of things. I'm trying to open a new taskpane when I click a new button. But I'm getting an error saying "Cannot get /taskpanetwo.html" where taskpanetwo.html is the new taskpane that I'm tring to add.

After I am succesful, I would like to know how can I add a button to navigate to the new taskpane from another one. But some context first,

I created a new control button like this

<Control xsi:type="Button" id="myCustom.openPaneButton">
     <Label resid="openPaneButton.Label"/>

    <Supertip>
       <Title resid="openPaneButton.Label" />
        <Description resid="openPaneButton.Tooltip" />
    </Supertip>

      <Icon>
         <bt:Image size="16" resid="myCustom.Icon.16x16"/>
         <bt:Image size="32" resid="myCustom.Icon.32x32"/>
         <bt:Image size="80" resid="myCustom.Icon.80x80"/>
      </Icon>

     <Action xsi:type="ShowTaskpane">
       <SourceLocation resid="myCustomTaskpane.Url" />
     </Action>
</Control>

with the resources modified and most impotantly the url elemnt is

<bt:Urls>     
 <bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html"/>
 <bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html"/>
 <bt:Url id="myCustomTaskpane.Url" DefaultValue="https://localhost:3000/taskpanetwo.html"/>
</bt:Urls>

My folder structure for the source is

-src
  -taskpane
    -taskpane.css
    -taskpane.js
    -taskpane.html
    -taskpanetwo.html

I don't know where I was wrong. I tried making another folder called taskpanetwo and put the taskpanetwo.html inside of it. But still no luck. And I couldn't find anything on the web either because I was probably not asking the right question.

I would appreciate any help on this. Thanks!


r/OfficeJs • • Jun 27 '24

Waiting on OP Debug excel add in with 3rd party OAuth

2 Upvotes

I’m trying to debug an Excel add in that is using a 3rd party oauth service. I’m unable to fully test the oauth integration because it needs to redirect back to the app. I can’t use localhost for obvious reasons, is it possible to configure the self signed office dev certs with a different host name that localhost?


r/OfficeJs • • Mar 15 '23

Is it possible to create an interactive userform like this in excel web version ?

Thumbnail
self.excel
2 Upvotes

r/OfficeJs • • Jul 19 '21

Mod Post [Survey] How do you use user-defined or custom functions?

Thumbnail
self.excel
2 Upvotes

r/OfficeJs • • Jun 22 '21

Unsolved Working with Word.RangeCollection

2 Upvotes

I'm having a hard time working with search results. Can anyone help me understand why this doesn't work?

click = async () => {

return Word.run(async (context) => {

let results = context.document.body.search("$*>", { matchWildcards: true, matchCase: false });

await context.load(results, "$all");

await context.sync();

var toPrint;

if (results.items.length > 0) {

toPrint = results.items[0].text;

//alternatively, this also doesn’t work: results.getFirst().text;

} else {

toPrint = "Nothing";

}

const p1 = context.document.body.insertParagraph(toPrint, Word.InsertLocation.end);

await context.sync();

})

When there's no results, it correctly adds "Nothing" to the document, but nothing happens if there are search results. Really appreciate the help!


r/OfficeJs • • Apr 16 '21

Solved Need help with my (simple) Excel Office Script for Power Automate

2 Upvotes

Hi guys,

I'm a total noob regarding coding / Typescript and having some issues with my script which should pick cells from an Excel Table and pass it to Power Automate. The errors im getting are shown in the image.

function main(workbook: ExcelScript.Workbook): Testarray[] {
// Get the first worksheet and the first table on that worksheet.
let selectedSheet = workbook.getWorksheet("Versuchsauftrag");
// Create the array of VA bjects to return.
let Test: Testarray[] = [];
var A0 = selectedSheet.getRange("D2"); // TestOrder
var A1 = selectedSheet.getRange("F9"); // CO
var A2 = selectedSheet.getRange("F10"); // SAPNetwork
var A3 = selectedSheet.getRange("F11"); // SAPActivity
var A4 = selectedSheet.getRange("F15"); // Initiator
var A5 = selectedSheet.getRange("G15"); // InitiatorTeam
var A6 = selectedSheet.getRange("C6"); // Project
var A7 = selectedSheet.getRange("D3"); // Title
var A8 = selectedSheet.getRange("A1"); // Version
var A9 = selectedSheet.getRange("A1"); // Dummy 
var A0S = A0.getValue();
var A1S = A1.getValue();
var A2S = A2.getValue();
var A3S = A3.getValue();
var A4S = A4.getValue();
var A5S = A5.getValue();
var A6S = A6.getValue();
var A7S = A7.getValue();
var A8S = A8.getValue();
var A9S = A9.getValue();
Test = [A0S,A1S,A2S,A3S,A4S,A5S,A6S,A7S,A8S,A9S];
// Log the array to verify we're getting the right rows.
  console.log(Test);
// Return the array of Valuess.
return Test;
}
/**
 * An array of VA Values will be returned from the script
 * for the Power Automate flow.
 */
interface Testarray {
TestOrder: string;
CO: string;
SAPNetwork: string;
SAPActivity: string;
Initiator: string;
InitiatorTeam: string;
Project: string;
Title: string;
Version: string;
Dummy : string;
}

This is my code. Can anyone tell me what I'm doing wrong? I'm trying to use this as a reference: Beispielszenario für Office-Skripts: Automatisierte Aufgabenerinnerungen - Office Scripts | Microsoft Docs