GithubHelp home page GithubHelp logo

officedev / office-js-docs-pr Goto Github PK

View Code? Open in Web Editor NEW
393.0 52.0 241.0 81.55 MB

Microsoft Office Add-ins Documentation

Home Page: https://learn.microsoft.com/office/dev/add-ins

License: Creative Commons Attribution 4.0 International

PowerShell 100.00%

office-js-docs-pr's Introduction

Office Add-ins documentation

Welcome to the Office Add-ins documentation repo. In this repository, you can find the documentation source files for Office JavaScript API concepts, quick starts, tutorials, and how-to guides. For the best experience, we recommend you view the Office Add-ins documentation on Microsoft Learn.

Note: You can find the Office JavaScript API reference documentation source files in the office-js-docs-reference repository.

Give us your feedback

The goal of the repo is to provide developer education on the platform's behavior. As such, issues should pertain to that educational content. Please submit an issue for the following scenarios.

  • Information needed to succeed in developing Office Add-ins is missing or incomplete.
  • Information is inaccurate or obsolete.
  • You find typos, grammatical mistakes, or other problems with the articles.
  • Articles are organized in a confusing or unintuitive manner.

If you are seeing product behavior that differs from the documentation, please provide as much of the following information as is possible and relevant.

  • The version and build number of the client you are using.
  • Steps to reproduce the issue.
  • Console output and error messages.

We also encourage you to fork, make the fix, and do a pull request of your proposed changes. For details, see Contribute to this documentation.

If your issue is not related to the Office Add-ins documentation, please post it to one of the following channels instead.

Join the Microsoft 365 Developer Program

Join the Microsoft 365 Developer Program to get resources and information to help you build solutions for the Microsoft 365 platform, including recommendations tailored to your areas of interest.

You might also qualify for a free developer subscription that's renewable for 90 days and comes configured with sample data; for details, see the FAQ.

Copyright

Copyright (c) 2016 Microsoft Corporation. All rights reserved.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

office-js-docs-pr's People

Contributors

alexjerabek avatar alison-mk avatar chbighammsft avatar cwlock avatar davidchesnut avatar ecoteam avatar elizabethsamuel-msft avatar hanjung avatar hodlhodl avatar hshapley avatar jasonjoh avatar kbrandl avatar keyur32 avatar lauragra avatar lezamax avatar linda-editor avatar lindalu-msft avatar lnyswonger avatar michaelmainer avatar mimisasouvanh avatar mlafleur avatar nokafor avatar reezaali avatar rick-kirkham avatar samantharamon avatar saunders77 avatar sumurthy avatar tcourtneyowen avatar umasubra avatar wrathofzombies avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

office-js-docs-pr's Issues

Powerpoint add in: Click event not triggring

Hi,

I am making an add-in for the powerpoint. One of the use case in my add-in is that when a user clicks on a slide (or clicks to select multiple slides), there should be an event which should trigger and returns the slides selected by the user. I am trying to use the following code but it doesn't work. It does work when a particular slide is selected and the add-in is loaded for the first time but after it is loaded and I select another slide, it doesnt triggers. That's the code

Office.context.document.getSelectedDataAsync(Office.CoercionType.SlideRange, function (asyncResult) {
        if (asyncResult.status == "failed") {
            app.showNotification("Action failed with error: " + asyncResult.error.message);
        }
        else {
            console.log(asyncResult.value);
        } 

P.S: The document is opened in edit mode always and I am testing my work on powerpoint online

Catalog Url Error

When I pasted the path to the folder that contains my add-in, I get the error "Sorry, the location you entered isn't correct - did you forget to use "https:"//"?" I assume I'm doing something wrong. I'm not using a web address, I'm simply trying to point to the folder on my computer that has the code. For context, I started from the "Build your first Excel add-in using jquery" and got directed here as part of "Try it out."


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Functionality not working

Hi- this loads correctly for me; however, the functionality of adding the text to the onenote page does not work. Selecting the button does nothing. Is there a reference to app.js missing?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

set function return on the fly

Regarding the return type of a custom function, is it possible to let the function choose whether it returns a string or a number ?
In the old XLL COM world we were able, using the XLOPER12 struct, to set the xltype field to xltypeStr or xltypeNum directly in the function process code, before returning the value.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

How to generate chart metadata in word binary data? ?

Charts that you can create and edit natively in Word 2013 are Excel 2013 charts, and their data is maintained on an Excel worksheet that's embedded as binary data in your Office Open XML package. Like the binary data parts for images, this Excel binary data is required, but there's nothing to edit in this part.

Binary data is described here is necessary, but how to generate binary data directly in the project? ?

app.js doesn't exist in the generated package

The yeoman generator doesn't create a file call app.js. Can you clarify where we are supposed to add the javascript text? Is there a different filename, or should we be creating the app.js file? Thanks for your help!


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Change dialog URL from parent add-in

I use dialog to show angular application and need to pass parameter from excel sheet after dialog opened.
Is there any way to change URL of existing dialog instance?
Local storage check looks bad.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Enabling SSO | Is the "Grant administrator consent to the add-in" mandatory during developement ?

Hello,

Documentation says that the "Grant administrator consent to the add-in" procedure is
"only needed when you're developing the add-in. When your production add-in is deployed to AppSource or an add-in catalog, users will individually trust it or an admin will consent for organization at installation."
https://docs.microsoft.com/en-us/office/dev/add-ins/develop/grant-admin-consent-to-an-add-in

Is it mandatory for SSO during the development phase ? If so, can you explain why ?
Thank you.

Regards,

Finding the development tools in Windows 10

I found them at C:\Windows\System32\F12\IEChooser.exe not C:\Windows\System32\F12\F12Chooser.exe


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

OAuth from Outlook for mac

Hi,
I am trying to perform OAuth from a react-based (with state managed by redux) front-end add-in for outlook (running on mac) with a node/express backend. Can I follow the same pattern as outlined here or would I need to change it somehow?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Package not found error.

When running following command from package manager console gets error package not found.
command:
Install-Package Microsoft.Identity.Client -Version 1.1.1-alpha0393 -Source https://www.myget.org/F/aad-clients-nightly/api/v3/index.json


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Passing information to the dialog

This article recommends passing information to the dialog by using localStorage as an intermediary. This method has some caveats though:

  • This doesn't seem to work on Word Online on Safari (tested on macOS 10.3.5). The dialog seems to get it's own localStorage instance and therefore has no access to data set in the taskpane. This is when displayInIframe is false (default behavior).
  • This method doesn't work when the user has disabled DOM Storage.

Query parameters have size limitations so that method is also not a universal solution.

An improved API to pass data to the dialog would help a lot here. There is already a UserVoice entry for this:
https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback/suggestions/17196659-improve-custom-dialog


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

minor formatting issues in tutorial

https://docs.microsoft.com/en-us/office/dev/add-ins/tutorials/word-tutorial?tutorial-step=6

has formatting issues on the page starting from

```js function 

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Sideload doesn't work on iPad

When following the procedure to upload the manifest.xml to the iPad using the latest iTunes version, we weren't able to find the Add-ins column.
See what see in iTunes here https://drive.google.com/file/d/1wUiZti9Tevvxw_sXU-6GfzFmJTSaRiZB/view?usp=sharing (rimes.xml is our manifest file)

If we put the file directly in the Excel Documents section in iTunes, the add-in doesn't appear when restarting the Excel application on the iPad, under the Developer heading in the Add-ins UI.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Office 365 Business

I can't get the sample code to run. Excel shows #NAME? in formulas using custom functions. I don't see customfunction.js loading in my http server log.
It looks like I don't have Office Insider features.
I'm using Office 365 Business, Monthly Channel (Targeted). Up to date (Version 1807 build 10325.20064). As per the documentation I should have the same functionality as an Office Insider which I can't get for this edition.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Excel custom functions is not working for excel online.

Article URL

Issue

It looks like support for Excel online was added on May 7, 2018, but I couldn’t get the CONTOSO example to either work or show any JS errors on Excel Online. I see build 16.0.10703.37951 if it helps. Appreciate any guidance.

HighResolutionIconUrl is not required?

On the required elements, I see that HighResolutionIconUrl is on the list, but not on the Manifest v1.1 XML file example.
I also found this https://github.com/OfficeDev/Office-Add-in-Commands-Samples/blob/master/Excel/Manifest/ExcelAddinWithCommandsOnDataTab.xml that points out: ´The HighResolutionIcon element is commented because it is valid only for 1.1 (or above) versions of the manifest.´
I am quite confuse about this. I lost quite a lot of time figuring out what was wrong because office-addin-validator would only give me "Unexpected error."


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Instructions to reload cache on Mac Sideloading page

https://github.com/OfficeDev/office-js-docs-pr/blob/master/docs/testing/sideload-an-office-add-in-on-ipad-and-mac.md

The instructions to force a reload of your add-in by clearing your cache on a Mac appear to be incorrect. I'm not sure what the appropriate directions are but I think I was able to clear my cache by navigating to "com.microsoft.Office365ServiceV2/Data/Caches/com.microsoft.Office365ServiceV2/" and removing files.

Article URL

Issue

Improve "F12 developer tool ..." help page for Outlook plugins

This one page only has examples for Word

https://github.com/OfficeDev/office-js-docs-pr/blob/master/docs/testing/debug-add-ins-using-f12-developer-tools-on-windows-10.md

But doesn't have an example for Outlook add-ins. Our problem is that, in the F12Chooser, we never see a target to choose for Outlook add-ins. They just never appear there. Also there is no UI control from that developer tool to select a file. Hence would be good to document more here. We're in the dark here.

Thanks!

Requirement Set Availability for Office 2016 MSI

Article URL

This article:
https://github.com/OfficeDev/office-js-docs/blob/master/reference/outlook/tutorial-api-requirement-sets.md

Issue

Says that 2016 MSI supports 1.4, but this is ONLY true if you have the right updates installed. I don't know exactly when 1.4 flips on, but I've narrowed it down this far:
osfshared.dll v 16.0.4266.1001, Thu Jul 30 2015 supports 1.3
osfshared.dll v 16.0.4702.1000, 15-May-2018 supports 1.4 and can be obtained via
https://support.microsoft.com/en-us/help/4022156/june-5-2018-update-for-office-2016-kb4022156

As we do with 2013, we should highlight which KB must be installed to light up 1.4 on 2016 MSI.

Accessing custom field from Task Pane App

Clarity missing on how to access enterprise custom fields from Task Pane App. It would be very helpful if this feedback can be given in 2 days.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Get the subtitiles of the selected slides

  • There is no information available in the docs that's y I am posting a technical question here *

Hi,

I am making an add-in for powerpoint and one of the use case is a user selects a slide or multiple slides and I want to extract the text of the selected slides. I am using the following code but I just get the title, id and index information of the slide and not the subtitles. Can anyone please help me? :) here's the code.

 Office.context.document.getSelectedDataAsync(Office.CoercionType.SlideRange, function (asyncResult) {
            if (asyncResult.status == "failed") {
                console.log("Action failed with error: " + asyncResult.error.message);
            }
            else {
                console.log(asyncResult.value.slides[0]); // This just returns an object with information (id, index and title)
            } 
        });

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

document have some mistake in article:Understanding the JavaScript API for Office

Article: Understanding the JavaScript API for Office

Issue: the code snippet in the The second level heading Initialization reason below the heading Initializing your add-in have some mistake,Seem to missing some symbols.
Original:

Office.initialize = function (reason) {
    $(document).ready(function () {
      switch (reason) {
        case 'inserted': console.log('The add-in was just inserted.');
        case 'documentOpened': console.log('The add-in is already part of the document.');
    }
}

Should be:

Office.initialize = function (reason) {
    $(document).ready(function () {
        switch (reason) {
            case 'inserted': console.log('The add-in was just inserted.');
            case 'documentOpened': console.log('The add-in is already part of the document.');
        }
    });
 };

The host name should not be based on already owned domain

The sample code (https://github.com/OfficeDev/office-js-docs-pr/blob/master/docs/develop/create-sso-office-add-ins-aspnet.md) is work correct. thank you

But the add-in should be deploy to production environment, not always localhost,. how to change the App Registration information? when I try to change the api registration info to "api://excelwebaddinsample.azurewebsites.net/f7e0154d-1258-42ef-9e89-9857889f4e01" , i got an error with message "The host name should not be based on already owned domain." and can not save this change.

what can i do ? thank you

The schema is not clear enough since the xml element require order

  1. The document about Office app element only list the element must contain. It is very helpful to troubleshoot issue if the document show the exact XML schema.
  2. To pass the XML verification, the SupportUrl have to include, however this element in the document is optional.

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Not able to debug office add-ins on Mac with Word version 16.13.1

How can i debug Office Add-ins on Mac with word version 16.13.1? Above all commands doesn't work. I can't see inspect element menu option using all commands available on document. Is there any other way to debug issue?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

UX Pattern Sample

The link to the UX pattern sample is not working. It points to a VSTS page and I get a 404 error saying I do not have access. Is this meant to be a public link?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Can non visual add ins be created?

Is it possible to create an add in that simply responds to any document or email being opened or closed?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Webservice call

I have this working and want to pull data from a remote server, but I can't get it working.

In the documentation, XHR is talked about but there is no example, just that there is a web service call. Have tried to use XMLHttpRequest, but get an N/A.

Would like some example code so I can then start building out my project


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Need to add note to Autoopen article

Article:
https://docs.microsoft.com/en-us/office/dev/add-ins/design/automatically-open-a-task-pane-with-a-document
Issue:
Need to add a note near the table of store types at the bottom that says the EXCatalog row is the row to use with add-ins that use Centralized Deployment in the Office 365 Admin Center. For more info, see this SO issue: https://stackoverflow.com/questions/48830331/autoopen-taskpanes-with-an-add-in-that-is-deployed-via-the-office-365-admin-cent

Missing item

So, to sum it up, Office Add-ins are unavailable for perpetually licensed copies of Office 2016 and earlier, and are unavailable for the mentioned OneNote apps, regardless of the licensing scheme. But one app is missing: The UWP version of the OneNote app, once included with Windows 10.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Overall Testing Story for Office Add-ins

This potentially is a User Voice but thought I would start here

TL;DR

  • Challenge 1: No documentation, or direction on mocking Office-Js Api's for testing.
    I know there are many permutations and opinions on tooling and testing frameworks so documenting them all is not feasible. But, potentially providing a mock or at least a small write up showing some samples I think would help.

  • Challenge 2: No easy way to test against multiple platforms/versions of Excel
    It would be nice if there was an easier way to test against multiple platforms. Similar to BrowserStack, SauceLabs and Xamarin Test Cloud or at something like what the Edge Team did with Virtual Machines. This is probably more of a User Voice but also could benefit from a short write-up giving some guidance.

Issue:
There is no documentation on how to best test add-in code. I understand that is fairly broad so let me explain.

I'm developing my add-in with Angular which has a great Unit and E2E integration testing story. Since the add-ins is web based I can leverage the Angular teams opinions on testing and if someone was using some other framework they could follow the guidelines set by that framework. But, where it gets a little bit dicey is when you start interacting with Office-js API's.

So, what I did was first focus completely on the UI and aspects of add-in that do not require office-js. This way I can follow my normal developer workflow (Chrome Debug tools, HMR code refreshes, automated unit testing,etc...). Then I introduced the Office API's and at this point I have avoided writing any tests for those functions. To me that is the first challenge because there is no examples, no mocks and in general no direction on how to best test these. I recognize I could mock/spy on the office api's but the setup to do that would be fairly painful (I recognize someone has to feel the pain at least once even if a mock was provided 😄 ).

The other challenge is when we need to actually test the add-in within Excel. I have to physically test on my Mac, my Windows 10 PC and with different version of Excel. The number of combinations of OS/Excel version is definitely not controllable, especially with external users (outside our company). So, I would love to get some direction here.

Spelling mistake

There seems to be a spelling mistake in the last section of the article. The sentence which has spelling mistake is "Depending on your language and framework, libraries might be available that will simplify the ser-side code you have to write".

In this sentence the 'ser-side' should be 'server-side'


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

index.html can't be loaded

Article:
index.html can't be loaded

Issue:
tried to test the tutorial and stopped at
"Test the add-in", Step 4 although
certificate is installed and
manifest-file is copied to shared folder
but index.html can't be loaded and gets http status code 404

Content add-ins lacks documentation

I have been searching for documentation on how to create content add-ins in vain. If it does exist, I feel this would be a nice place to put it since this documentation shows how to create a Task-pane add-in.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

doesn't work

Documents/Sample/Demo from Microsoft sites usually don't work. This one the same.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Confusing use of second button in default yo office react project instructions

Article:
https://github.com/OfficeDev/office-js-docs-pr/blob/master/docs/design/using-office-ui-fabric-react.md
Issue:
The instructions begin by telling the user to add a button. This is confusing in two ways:

  1. There is already a button on the page that is part of the default project that the generator creates. It is wired up to a (empty) handler. Why do we not simply have the user add code to the existing handler, instead of having the user create a whole new button?
  2. The code snippet imports PrimaryButton and IButtonType from office-ui-fabric-react. But the code that is generated imports Button and ButtonType from office-ui-fabric-react. If we go ahead and have the user create a new button, then the text should explain why it is based on different exported classes than the button that yo office generated.

yoofficereact

Yo Office

Step number 3 in the "Create the web app" section appears to be out of date. I get a different set of questions.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Mention 12009 error in "Errors and events in the dialog window" section

Excel Online allows ignoring dialog box. It produces the event:

code: 12009
message: "The user chose to ignore the dialog box."
name: "Display Dialog Error"

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

window.location.href stopped working recently on Excel for Mac?

Opening bug based on a Stackoverflow thread: https://stackoverflow.com/questions/48681380/window-location-href-stopped-working-recently-on-excel-for-mac

In a Javascript based Excel add-in, it navigates to a third party oauth sign-in page using the following code:
window.location.href = "https://app.hubspot.com/oauth/authorize";

It has been working well on Excel rich client on Mac (version 16.9 (180116)) until recently. Now it won't navigate to the 3rd party sign-in page anymore. There is no change in add-in manifest XML file and the 3rd party domain is whitelisted in the manifest as below too. The same code and manifest is still working well on PC Excel and Excel Online.

<AppDomain>https://app.hubspot.com/</AppDomain>

I think the way Excel for Mac supports the the window.location.href was changed recently? Thanks for your help!

CONTOSO functions not loading - #NAME? errors

Article URL

https://docs.microsoft.com/en-us/office/dev/add-ins/excel/custom-functions-overview

Issue

I've followed the instructions as outlined in the article above:

  1. Published the js, json, and html file onto localhost,
  2. Replaced the manifest file's URL references with my local host and set it up in a shared folder... triple checked the URLS are correct.
  3. When adding it via Excel (insert -> add-in -> shared folder -> add contoso the right sidebar pops up with the HTML text
  4. When trying to type in CONTOSO.ADD42 (1,1) I receive a #NAME? error - typing in CONT doesn't auto-suggest any CONTOSO functions

Any assistance would be greatly appreciated.

I am running Office 365, signed up to the Monthly Channel (Targeted) level of the Office Insider, and am currently using Version 1807 (Build 1032.20075)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.