Specify "Excel Only" in the manifest file - ms-office

I submitted an Excel add-in several days ago. Today, I received a change requirement:
1.2 Your app or add-in must work according to your description, and must not be in an unfinished state.`
Your add-in claims to work in the Word, PowerPoint and Project clients however it does not appear to be fully functional as there appears to be no interaction between your add-in and the mentioned clients, except for the Excel client. Please ensure your add-in works in all declared applications.
If you do not intent to support the Word, PowerPoint and Project clients, please make the relevant changes in your add-in manifest.
I don't know where (in the manifest file) to specify this add-in is for Excel only. Could anyone help?

In your manifest, there will be a section like:
<Hosts>
<Host Name="Workbook" />
<Host Name="Presentation" />
<Host Name="Project" />
<Host Name="Document" />
</Hosts>
Remove all the <Host ... /> lines except the one containing "Workbook", and you'll be all set.
See https://dev.office.com/docs/add-ins/overview/add-in-manifests for more information.

Related

Deploy, host and sideload Excel Office Addin - Error loading add-ins

I've been trying to develop and deploy an Excel Office Addin and I've run into a few issues.
I've created an office addin by following the tutorials posted on your site. I've confirmed that I can run the addin in debugging (from my Visual studio code). So the next step is hosting and deploying the addin.
I first followed the instructions here: https://learn.microsoft.com/en-us/office/dev/add-ins/publish/publish-add-in-vs-code
I was able to publish it on an Azure static website and when I browse there, I can see it say "Please sideload your add-in to see app body." So far so good.
Next, I followed the steps here : https://learn.microsoft.com/en-us/office/dev/add-ins/testing/create-a-network-shared-folder-catalog-for-task-pane-and-content-add-ins
I was able to create a shared folder and add it as a trusted catalog in Excel. When I open up Excel, I can see my Addin in the shared folder section of "My Addins". I can click on it.
However, as soon as I click on it to load it in Excel, the status bar in my Excel says "Error loading add-ins" and there's not much else to do. It doesn't provide me anymore logs to work off of. The very last step of loading the office addin fails.
I believe that I've followed all the instructions in the tutorial correctly, including changing references in my manifest.xml file from localhost to the static website's url.
I have a few questions...
Was I correct to follow those two tutorials above in that order? In other words, has there been an issue with my process?
One of the steps mentioned copy/pasting the manifest file into the shared folder I created. Am I pasting the manifest.xml? Or the manifest.prod.xml from my dist folder? In both cases I run into the same error of not being able to load it properly in Excel.
It mentions to replace all references of localhost to the static website's URL in the manifest.xml file. I noticed that there is also a file called webpack.config.js in the root folder of the excel addin project that has a constant called urlProd with a comment telling us to change it to the production deployment location. The tutorials make no mention of this. I did change this to point to the static website I created to host the addin. Is this necessary?
EDIT:
My manifest, where I've replaced localhost with the url of my azure static website:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="TaskPaneApp">
<Id>5a711560-c5ed-4c07-8020-39460e56846b</Id>
<Version>1.0.0.0</Version>
<ProviderName>Contoso</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="MyCustomFunctions"/>
<Description DefaultValue="Write your own Excel functions in TypeScript."/>
<IconUrl DefaultValue="https://[static.website.url.on.azure]/assets/icon-32.png"/>
<HighResolutionIconUrl DefaultValue="https://[static.website.url.on.azure]/assets/icon-64.png"/>
<SupportUrl DefaultValue="https://www.contoso.com/help"/>
<AppDomains>
<AppDomain>https://www.contoso.com</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Workbook"/>
</Hosts>
<Requirements>
<Sets DefaultMinVersion="1.1">
<Set Name="SharedRuntime" MinVersion="1.1"/>
</Sets>
</Requirements>
<DefaultSettings>
<SourceLocation DefaultValue="https://[static.website.url.on.azure]/taskpane.html"/>
</DefaultSettings>
<Permissions>ReadWriteDocument</Permissions>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<Hosts>
<Host xsi:type="Workbook">
<Runtimes>
<Runtime resid="Taskpane.Url" lifetime="long" />
</Runtimes>
<AllFormFactors>
<ExtensionPoint xsi:type="CustomFunctions">
<Script>
<SourceLocation resid="Functions.Script.Url"/>
</Script>
<Page>
<SourceLocation resid="Taskpane.Url"/>
</Page>
<Metadata>
<SourceLocation resid="Functions.Metadata.Url"/>
</Metadata>
<Namespace resid="Functions.Namespace"/>
</ExtensionPoint>
</AllFormFactors>
<DesktopFormFactor>
<GetStarted>
<Title resid="GetStarted.Title"/>
<Description resid="GetStarted.Description"/>
<LearnMoreUrl resid="GetStarted.LearnMoreUrl"/>
</GetStarted>
<FunctionFile resid="Taskpane.Url"/>
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<OfficeTab id="TabHome">
<Group id="CommandsGroup">
<Label resid="CommandsGroup.Label"/>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Control xsi:type="Button" id="TaskpaneButton">
<Label resid="TaskpaneButton.Label"/>
<Supertip>
<Title resid="TaskpaneButton.Label"/>
<Description resid="TaskpaneButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<SourceLocation resid="Taskpane.Url"/>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://[static.website.url.on.azure]/assets/icon-16.png"/>
<bt:Image id="Icon.32x32" DefaultValue="https://[static.website.url.on.azure]/assets/icon-32.png"/>
<bt:Image id="Icon.80x80" DefaultValue="https://[static.website.url.on.azure]/assets/icon-80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="Functions.Script.Url" DefaultValue="https://[static.website.url.on.azure]/dist/functions.js"/>
<bt:Url id="Functions.Metadata.Url" DefaultValue="https://[static.website.url.on.azure]/dist/functions.json"/>
<bt:Url id="Functions.Page.Url" DefaultValue="https://[static.website.url.on.azure]/dist/functions.html"/>
<bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812"/>
<bt:Url id="Commands.Url" DefaultValue="https://[static.website.url.on.azure]/commands.html"/>
<bt:Url id="Taskpane.Url" DefaultValue="https://[static.website.url.on.azure]/taskpane.html"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="Functions.Namespace" DefaultValue="CONTOSO"/>
<bt:String id="GetStarted.Title" DefaultValue="Get started with your sample add-in!"/>
<bt:String id="CommandsGroup.Label" DefaultValue="Commands Group"/>
<bt:String id="TaskpaneButton.Label" DefaultValue="Show Taskpane"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the HOME tab and click the 'Show Taskpane' button to get started."/>
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Click to Show a Taskpane"/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
Was I correct to follow those two tutorials above in that order? In other words, has there been an issue with my process?
It depends... The Sideload Office Add-ins for testing from a network share article states the following:
Deployment by network share is not supported for production add-ins.
And also you can meet the following statement:
This deployment option is intended to be used when you have completed development and testing on a localhost and want to test the add-in from a non-local server or cloud account.
So, it is possible to use shared folders for sideloading add-ins on Windows.
But it seems you have already published the manifest file to the static storage in Azure. So, you can use it for sideloading the add-in in Excel - just use the manifest's URL for adding the add-in in Excel.
One of the steps mentioned copy/pasting the manifest file into the shared folder I created. Am I pasting the manifest.xml? Or the manifest.prod.xml from my dist folder? In both cases I run into the same error of not being able to load it properly in Excel.
The manifest.prod.xml from your dist folder is uploaded to the static storage in Azure, so you can refer to it instead of using shared folders. It is up to you which way is to choose - use the shared folder or hosted file on the server. However, you need to pay attention to the URLs used in the manifest file - they should point to the add-in's files.
It mentions to replace all references of localhost to the static website's URL in the manifest.xml file. I noticed that there is also a file called webpack.config.js in the root folder of the excel addin project that has a constant called urlProd with a comment telling us to change it to the production deployment location. The tutorials make no mention of this. I did change this to point to the static website I created to host the addin. Is this necessary?
Tutorials can be a bit old and may not reflect all information available to developers. Project skeletons created with Yeoman generator are updated from time to time and you may get new features implemented out of the box.
If you set the urlProd constant to a valid URL then you can get the URLs set correctly in the manifest.prod.xml file from your dist folder after the project is built (in the production mode).
The manifest file is uploaded to the Azure static web site along with other add-in files. To install the add-in by using that manifest file it should point to the production URL. It is up to you to change the URLs manually or automatically (by using webpack).
Also, the AppDomain element specifies an additional domain that Office should trust, in addition to the one specified in the SourceLocation element.

What will happen when we modify manifest of an existing Office add-in?

I have an Office add-in available in the store. Currently, part of its manifest file is
<Requirements>
<Sets>
<Set Name="ExcelApi" MinVersion="1.2"/>
</Sets>
</Requirements>
I want to change it to the follows, and expect this will make the add-in available in Office Professional Plus 2016.
<Requirements>
<Sets>
<Set Name="ExcelApi" MinVersion="1.1"/>
</Sets>
</Requirements>
So after submitting the new manifest, will the add-in be re-validated again? During this period, will the existing add-in be still usable?
Any change to the manifest requires re-validation before publishing.
When you submit your updated add-in for validation, the existing version remains available.

Specify that addIn doesn't work in Office 2013

When submitting our addIn we got the following message back:
If you do not support 2013 SP1 because you are using an API only available in 2016/Online, you must put these apis in the requirements tag in your manifest.
Our addIn does not work in Office 2013 since it uses both WordApi and ExcelApi (When opened in Word and Excel accordingly) which is not available in Office 2013.
Therefore we tried to specify in our manifest file that our addIn requires WordApi 1.1 by adding this to the manifest file:
<Requirements>
<Sets DefaultMinVersion="1.1">
<Set Name="WordApi" MinVersion="1.1"/>
</Sets>
</Requirements>
However, when we add the requirement of WordApi then the addIn doesn't show up in PowerPoint and Excel and vice versa.
How do we specify that the addIn is not available in Office 2013 without having to create separate manifest files for each office Host?
If your manifest contains Word API (or any host specific API) then it will not show up in other clients.
If your add-in is designed to work in multiple clients, and requires an API not currently supported in Office 2013, please include these details in the test notes of your next submission. Should the validation team need any additional information to resolve the issue, they will reachout to you at the email address on record to discuss how to proceed.
It looks like you're tag is correct. I don't have a solution but perhaps something to try. I've read that the location of the Requirements Tag matters. I put my requirements tag above the tag.
The article [https://learn.microsoft.com/en-us/office/dev/add-ins/testing/troubleshoot-manifest][1] discusses validating your xml file with office-toolbox. You run the command "npx office-toolbox validate -m MANIFEST_FILE" (see the article for full details). When I run this validation command on my manifest which has ...
<Sets DefaultMinVersion="1.1">
<Set Name="ExcelApi" MinVersion="1.1"/>
</Sets>
</Requirements>```
It returns
```Validation: Passed
Based on the requirements specified in your manifest, your add-in can run on the following platforms; your add-in will be tested on these platforms when you submit it to the Office Store:
- Excel for iPad
- Excel 2016 for Mac
- Excel 2016 or later
- Excel Online```
The key here being that it recognizes that it is only valid for Excel 2016. We've been using this to identify when our tags are working without having to submit to MSFT.
[1]: https://learn.microsoft.com/en-us/office/dev/add-ins/testing/troubleshoot-manifest

Creating a custom Add-in for Excel 2016 and it is not available from the My Add-In menu

I have created an Excel add-in following the instructions from https://dev.office.com/docs/add-ins/excel/build-your-first-excel-add-in. Everything went fine following along with the instructions and then I copied the solution out to a network share and then copied the manifest file to a different network share.
Then I tried following the instructions in the "Try it out" section of the page with adding the network location of the manifest file to into the Trusted Add-On Catalogs. Then after restarting Excel and going into the My Add-Ins button I see the Shared Folder tab on the screen, but I do not see the custom add-in, so I can't select it. Does anyone know what I'm missing.
My manifest file looks like this
<?xml version="1.0" encoding="UTF-8"?>
<!--Created:cb85b80c-f585-40ff-8bfc-12ff4d0e34a9-->
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="TaskPaneApp">
<Id>D38C7DFE-AC71-4C20-B477-BD8508058D95</Id>
<Version>1.0.0.0</Version>
<ProviderName>Microsoft</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Sample Excel Add-In" />
<Description DefaultValue="Sample Excel Add-In"/>
<Capabilities>
<Capability Name="Workbook" />
</Capabilities>
<DefaultSettings>
<SourceLocation DefaultValue="\\pathtowheresolutionwas copied\ExcelAddInTest\Home.html" />
</DefaultSettings>
<Permissions>ReadWriteDocument</Permissions>
</OfficeApp>
The problem here was I followed along with the instructions in the document, but there is one part that is not really correct. It has you copy the Website out to a network share, but that can't be copied out to a network share it needs to be published to a website that is running https.

Make an add-in available in Excel 2016 for Windows

Following this thread, I have modified the manifest file of my two add-ins, and resubmitted to the store. Yesterday, I got a mail to say one is approved, and today I got another mail to say the other one is approved as well.
However, I could not find them in Excel 2016 for Windows. Then I go to the web page of the Office Store. I could find the two add-ins, but I see in their page: This add-in requires one of the following applications: Excel 2016 for Mac, that's it, it does NOT mention Excel 2016 for Windows. (I have not checked them in Excel 2016 for Mac, because I have not installed Excel 2016 for Mac).
The follows is the part related to version in their manifest file. So does anyone know how to modify this to make the add-in available in Excel 2016 for Windows, where my add-ins work fine.
Moreover, once I modify their manifest, I should unpublish the add-ins, and then re-submit them?
<?xml version="1.0" encoding="UTF-8"?>
<Hosts>
<Host Name="Workbook" />
</Hosts>
<Requirements>
<Sets>
<Set Name="ExcelApi" MinVersion="1.2"/>
</Sets>
</Requirements>
<DefaultSettings>
<SourceLocation DefaultValue="...Home.html" />
</DefaultSettings>
<Permissions>ReadWriteDocument</Permissions>
Your manifest is correct for enabling an add-in in Excel 2016 for Windows, Mac, and Excel Online.
It's possible that the validation team manually tagged your add-in to not support Excel 2016 for one of the following reasons:
You specified in the description or the "Testing Notes" field that the add-in shouldn't be supported on Excel 2016 for Windows.
The validators found a bug that was specific to Windows. Normally if that happened they would reject your submission at least once first and include an explanation in the report. So check all your previous submission reports for information.
If none of the above are the reason, then there was some other problem during validation, perhaps a bug. On your Seller Dashboard page:
Scroll to the bottom and click Support:
Problem type: App submission and validation
Category: App validation results
Start email (the team with expertise here is in Europe, so the chat/call is likely to be unsuccessful during North American business hours)
Describe the issue briefly/politely, including links to your add-ins, and submit

Resources