0

I am trying to open taskpane when user opens excel file. I explained details below on how I approached the problem. This is working fine in excel desktop but not in excel web.

I was trying to open taskpane on opening the excel file. I created Excel file using open XML SDK and set property 'Office.AutoShowTaskpaneWithDocument' to true and also set the AddIn path to my local shared drive. When I open file with excel desktop, this works fine. When I tried the same on Excel web,it wont work. In developer console, I find the below error.Can someone help me how to debug this issue or what is the issue with this AddIn ?

Error in dev console

Manifest.xml:

<?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>1234c63f-b860-4280-8280-3e4fb5ea7726</Id>
    <Version>1.0.0.0</Version>
    <ProviderName>Microsoft</ProviderName>
    <DefaultLocale>en-US</DefaultLocale>
    <DisplayName DefaultValue="test" />
    <Description DefaultValue="test" />
    <IconUrl DefaultValue="https://localhost:3000/manifestimages/appLogo_64px.png" />
    <HighResolutionIconUrl DefaultValue="https://localhost:3000/manifestimages/appLogo_128px.png" />
    <SupportUrl DefaultValue="https://localhost:3000/help" />
    <AppDomains>
        <AppDomain>https://localhost:3000</AppDomain>
    </AppDomains>
    <Hosts>
        <Host Name="Workbook"></Host>
    </Hosts>
    <Requirements>
        <Sets DefaultMinVersion="1.1">
            <Set Name="SharedRuntime" MinVersion="1.1" />
        </Sets>
    </Requirements>
    <DefaultSettings>
        <SourceLocation DefaultValue="https://localhost:3000/commands.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" />
                    <Runtime resid="Commands.Url" lifetime="long" />
                </Runtimes>
                <DesktopFormFactor>
                    <FunctionFile resid="Commands.Url" />
                    <ExtensionPoint xsi:type="PrimaryCommandSurface">
                        <OfficeTab id="TabHome1">
                            <Group id="OfficeTab1.Group">
                                <Label resid="OfficeTab1.Group.Label" />
                                <Icon>
                                    <bt:Image size="16" resid="Refresh-16" />
                                    <bt:Image size="32" resid="Refresh-32" />
                                    <bt:Image size="80" resid="Refresh-80" />
                                </Icon>
                                <Control xsi:type="Button" id="InitSheet">
                                    <Label resid="InitSheet.Button.Label" />
                                    <Supertip>
                                        <Title resid="InitSheet.Button.Label" />
                                        <Description resid="InitSheet.Button.Tooltip" />
                                    </Supertip>
                                    <Icon>
                                        <bt:Image size="16" resid="Refresh-16" />
                                        <bt:Image size="32" resid="Refresh-32" />
                                        <bt:Image size="80" resid="Refresh-80" />
                                    </Icon>
                                    <Action xsi:type="ShowTaskpane">
                                        <TaskpaneId>Office.AutoShowTaskpaneWithDocument</TaskpaneId>
                                        <SourceLocation resid="Taskpane.Url" />
                                        <Title resid="FRE.Taskpane.Title" />
                                    </Action>
                                </Control>
                            </Group>
                        </OfficeTab>
Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • When something works in desktop Office but not in Office on the web, it is frequently a bug. Wait a couple of days. If you don't get an answer here, create an issue on the [office-js](https://github.com/OfficeDev/office-js/issues/new/choose) repo. – Rick Kirkham Mar 31 '22 at 20:26

1 Answers1

0

This document with examples that may useful if you didn't see it before: https://learn.microsoft.com/en-us/office/dev/add-ins/develop/automatically-open-a-task-pane-with-a-document.

Ensure your code contains:

Office.context.document.settings.set("Office.AutoShowTaskpaneWithDocument", true);
Office.context.document.settings.saveAsync();

To better locate your issue, please share a code snip for repro.

yuc014
  • 36
  • 3