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 • • 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 • • 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 • • 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 22 '23

Waiting on OP Officejs word add-ins, method saveAsync not working

1 Upvotes

Hello,

Just starting with OfficeJs. I came across a very strange problem, there are some cases in which the Office.context.document.settings.saveAsync is not saving but it doesn't throw any error. Why could this be happening? I didn't find a pattern to reproduce it, it just happens sometimes and if I do a reload it fixes it.

This is how I am saving:

protected saveSetting<T>(key, val): Observable<T> {
  return new Observable<T>(subscriber => { 
    try {                 
  Office.context.document.settings.refreshAsync((asyncResult) => { 
        if (asyncResult.status === Office.AsyncResultStatus.Failed) { 
      console.log('saveAsync failed: ' + asyncResult.error.message);              
    } 
        Office.context.document.settings.set(key, val); 
    Office.context.document.settings.saveAsync((result) => { 
          if (result.status === Office.AsyncResultStatus.Failed) { 
        console.log('saveAsync failed: ' + result.error.message);                  
      } 
          subscriber.next(val); 
          subscriber.complete();              
        });          
      });       
    } catch (e) { 
      subscriber.error('Error saving setting ' + key); 
      subscriber.complete();       
    } 
  }); 
}

And this is how I'm getting the value:

protected getSetting<T>(key): Observable<T> {
  return new Observable<T>(subscriber => { 
    try { 
      Office.context.document.settings.refreshAsync((asyncResult) => { 
        if (asyncResult.status === Office.AsyncResultStatus.Failed) { 
      console.log('saveAsync failed: ' + asyncResult.error.message);             
    }  
        subscriber.next(Office.context.document.settings.get(key)); 
        return subscriber.complete();          
      });      
    } catch (e) { 
      subscriber.next(null); 
      return subscriber.complete();      
    }   
  }); 
}

Word Version 2304 Build 16.0.16327.20324) 64-bit.

Thanks!


r/OfficeJs • • Dec 01 '23

Unsolved Local Transformers.js model integration with Office.js add-in

1 Upvotes

For context, I am developing a Word add-in using Office.js which will ideally implement ML models using transformers.js.

I have successfully tested the intended model in a separate project using the local model files and the transformers.js library.

However, when I came to adding the code to my Office.js add-in, the model files are not successfully being retrieved. In other words, the /models/ folder is not visible to my add-in javascript.

Does anyone have any idea what could be causing this issue and/or what can be done to debug it? Any help would be greatly appreciated!


r/OfficeJs • • Jul 26 '24

Waiting on OP Duplicating a Slide in powerpoint office js

1 Upvotes

Hey. I am trying to develop a add-in. But I cannot find the simplest of functions in the office.js . I am unable to duplicate a slide. Anyone knows how to do it ? I can extract the text from a slide and place it in another one but i am unable to extract all the shapes and texts within a slide and replicate it in another slide.


r/OfficeJs • • Jul 11 '24

Unsolved office-document.js reference

1 Upvotes

Setup a template for an excel addin and trying to understand how everything works. One thing I'm confused about is where the office-document.js file is referenced. I'm able to write functions within the file and it does update the excel object, however, I'm not sure where or how that is happening. Is it implicit when the project is built? Also, is it possible to segment the files so you have multiple files that interact with excel and not just one big office-document.js file?


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 • • Mar 15 '23

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

Thumbnail
self.excel
2 Upvotes

r/OfficeJs • • Nov 20 '22

Unsolved Outlook detect attachment

1 Upvotes

Hi all,

Regarding the activation rules for outlook plugins, I was wondering whether these activation rules also apply when composing an email. In other words, does an activation rule for attachments trigger when you add an attachment to a mail you are composing? Or is there a different approach to this?


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 • • 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 • • Sep 24 '19

Unsolved Need to open a SharePoint Word document live from my office.js Add-in

1 Upvotes

Title says it all.. any help would be greatly appreciated!


r/OfficeJs • • Sep 18 '18

ProTip Office UI Fabric JS

Thumbnail dev.office.com
1 Upvotes

r/OfficeJs • • Sep 18 '18

ProTip Build an Office add-in using modern JavaScript tools and techniques [Video]

Thumbnail
youtube.com
1 Upvotes

r/OfficeJs • • Feb 14 '20

All about the BigInt - New Javascript Data Type

Thumbnail
youtube.com
1 Upvotes

r/OfficeJs • • Sep 18 '18

ProTip Script Lab Demo [Video]

Thumbnail
youtube.com
3 Upvotes

r/OfficeJs • • Jun 21 '19

jExcel the javascript spreadsheet component - MIT - Now trending on Github ;)

Thumbnail
github.com
1 Upvotes

r/OfficeJs • • Sep 18 '18

ProTip Angular 2 and Fabric js Setup [Video]

Thumbnail
youtube.com
1 Upvotes

r/OfficeJs • • Sep 18 '18

ProTip Creating Office.js Add-ins ​​[Video]

Thumbnail
youtube.com
1 Upvotes

r/OfficeJs • • Jun 12 '19

Solved moving value from one cell to another

1 Upvotes

I am trying to move pieces of data from one part of a workbook to a cell in a data table specific to the date. I was curious about how to potentially do this. Thanks in advance. I have the most recent version of Excel FYI.


r/OfficeJs • • Nov 02 '18

Mod Post Microsoft Excel Product Team AMA - November 6th at 2:00 PM Eastern Time (GMT-5)

Thumbnail
self.vba
1 Upvotes

r/OfficeJs • • Sep 18 '18

ProTip Understanding the JavaScript API for Office

Thumbnail
docs.microsoft.com
1 Upvotes

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!