Questions tagged [excel-web-addins]

212 questions
1
vote
1 answer

Debug Office add-in in VS code

Beginner in Office add-ins and VS code here... I followed the steps from this MS tutorial on creating an Excel custom functions add-in. Because I want to debug it using VS code, I had to create an Excel Custom Functions Add-in project option in the…
1
vote
1 answer

Is there a way to capture OnSave() event in JavaScript based Office Add-in?

I want to capture Information like who created/edited the document (Excel, word or ppt), It's File path both Old and new filePath (if saved at a different place) and what is the change. I want to capture these information whenever user saves a…
1
vote
1 answer

How can I get a list of other users in the current excel sheet?

I am the author of an Excel add-in that loads data from an internal api. What I want to do is avoid having many users run the StreamingInvocations concurrently to reduce load on my api and reduce updates on the sheet. Want I want to do is detect all…
1
vote
1 answer

Selecting a shape in Office.js

Is there any way to select a shape in Office.js? The Excel.Shape class doesn't have a select() method like the Excel.Range class does. Is this not supported yet in Office.js?
1
vote
1 answer

Evaluate a formula in JavaScript API (2022)

(* As Excel JavaScript APIs evolve fast, I would like to re-ask a critical question. *) How could we evaluate a formula in JavaScript API as Application.Evaluate does in VBA? If there is no dedicated API, what are the workarounds today? PS: previous…
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
1
vote
1 answer

How do I mock the settings attribute of an Office object using the office-addin-mock library?

In order to test this function... export async function blueBlackToggle() { try { await Excel.run(async context => { const range = context.workbook.getSelectedRange(); let blueBlackToggleNum =…
1
vote
0 answers

Using project application settings in Excel Web Add-in development Visual Studio

We are currently trying to developing an Excel web Add-in (Excel Office add-in). While development, we came across a requirement to preserve current user's details in the add-in (from a third-party login inside add-in) like userID, userName,…
1
vote
1 answer

Fire event from Commands to Taskpane in Office Web Addin

I am developing an Office/Excel Web addin using React in which I have some Ribbon/ContextMenu button which needs to update data in Taskpane UI. Previously I was using Storage event and it was working fine. However recently I moved to Shared JS…
1
vote
1 answer

Remove multiple empty rows at once in ExcelJS

I have the following function that works well for small number of rows: async function RemoveEmptyRows() { await Excel.run(async (context) => { const sheet = context.workbook.worksheets.getActiveWorksheet(); var selectedRange =…
Tomasz Decker
  • 114
  • 2
  • 14
1
vote
1 answer

Excel Web Api Ribbon Button with Dropdown List

I would like to create a dropdown menu on the Ribbon with Excel Web API. In Microsoft documentation, there is an example of how to make it. https://learn.microsoft.com/en-us/office/dev/add-ins/reference/manifest/control
Tomasz Decker
  • 114
  • 2
  • 14
1
vote
1 answer

How to run taskpane.js function from ribbon button?

I'm delveloping JS Excel Addin, I need to run a function and show the results in taskpane. I wrote a function in taskpane.js and add it to taskpane load event but it won't run if taskpane is already opened. Is there any one to run taskpane function…
1
vote
1 answer

Error in copy-pasting(in loop) to multiple Excel ranges online, using office.js

I am trying to populate multiple ranges using a formula and then convert the range to values using paste as value. The Office add-in is being used on Sharepoint Excel for the web. The code usually works but once in a while I get a "Rich API: An…
1
vote
0 answers

Excel Office Add-in Shows Blank after deploying

I have developed an Office Excel Add-in using yo generator, Angular in VS code. Add-in works fine locally. It shows up on the pane. However, after generating a build in dist folder, I happened to deploy this on the web server and calling this URL in…
Deepak
  • 1,038
  • 4
  • 18
  • 31
1
vote
1 answer

Is there a way to run Office.js code as soon as Excel has started up or when the manifest is loaded in?

I want to register events at the earliest possible stage for Excel, is it possible to register those events upon starting Excel similar to how there is a Startup event in VSTO? If that isn't possible, is there a way for me to run Office.js code to…
Harsh Patel
  • 151
  • 6
1
vote
1 answer

Post data to server using Excel Add-in

The Project is an Excel Web Add-in. I am currently running the add-in on Visual Studio in debug mode and would like to post data to the server. The data is sent through an ajax call. Code for Posting data: Excel.run(function (context) { let…