2

I am following this link to try custom functions. The following manifest does enable the custom functions:

<?xml version="1.0" encoding="utf-8"?>
<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>a124c024-2ae8-4d1a-bb00-7ff68c6fb738</Id>
  <!-- Generate a new guid for your Id element -->
  <Version>1.0.0.0</Version>
  <ProviderName>Contoso</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Custom functions sample" />
  <Description DefaultValue="A variety of sample custom functions." />
  <Hosts>
    <Host Name="Workbook" />
  </Hosts>
  <DefaultSettings>
    <SourceLocation DefaultValue="https://www.myweb.com/customfunctions.html"/>
  </DefaultSettings>
  <Permissions>ReadWriteDocument</Permissions>
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Hosts>
      <Host xsi:type="Workbook">
        <AllFormFactors>
          <ExtensionPoint xsi:type="CustomFunctions">
            <Script>
              <SourceLocation resid="functionsjs" />
            </Script>
            <Page>
              <SourceLocation resid="functionshtml"/>
            </Page>
          </ExtensionPoint>
        </AllFormFactors>
      </Host>
    </Hosts>
    <Resources>
      <bt:Urls>
        <bt:Url id="functionsjs" DefaultValue="https://www.myweb.com/customfunctions.js" />
        <bt:Url id="functionshtml" DefaultValue="https://www.myweb.com/customfunctions.html" />
      </bt:Urls>
    </Resources>
  </VersionOverrides>
</OfficeApp>

Now, I'm wondering if it is possible to have custom functions and a task pane at the same time. So I added <body>this is the body</body> in https://www.myweb.com/customfunctions.html. However, reloading the add-in does not make the task pane appear.

Could anyone tell me if it is possible to have custom functions and a task pane at the same time? what should I amend to enable this?

Edit 1: Changing xsi:type="VersionOverridesV1_0" to xsi:type="TaskPaneApp" does open the task pane, but when we try the custom functions, an error `We can't start this add-in because it isn't set up properly" is raised.

So I am still looking for a proper solution.

0

1 Answer 1

1
+50

Yes, you can have custom functions and a task pane at the same time in the same add-in, by using add-in commands.

To enable a task pane command, use the ShowTaskpane action in your manifest (see the help topic, like in this sample manifest on GitHub).

If you'd also like your task pane to be "permanent" whenever it's inserted, then use this topic page on automatically opening task panes.

-Michael (PM for custom functions)

2
  • Hello Michael, do you have any idea for this question? Cheers
    – SoftTimur
    Jul 9, 2018 at 6:46
  • How would custom functions and task pane configuration appear in the manifest if we wanted to have them in the same add-in and control them from the same html and js files?
    – geochr
    Jul 17, 2018 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.