0
  1. 一切正常,直到我在 excel 64bit 中测试了我的插件。CustomTab我有一个manifest.xml,它显示在 32 位。 在此处输入图像描述 但是64位中什么都没有。顺便说一句,我已经GetStarted在我的 xml 中编写了节点,它也不起作用。 在此处输入图像描述

  2. 工作表 API 的可见性也不适用于 64 位。https://dev.office.com/reference/add-ins/excel/worksheet 。并Excel.run抛出一个Assignment to read-only properties is not allowed in strict mode错误sheet.visibility = Excel.SheetVisibility.hidden;

  3. 这个问题不适合在这里提出。在 excel 64 位中给出初始值后,我的 Rtd 服务器无法更新单元格fetching,但它在 32 位中运行良好。

这是我的excel版本:(16.0.4266.1001)64bit,测试机是window10。

这是我的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">

         <!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
         <!-- 开始基本设置:外接程序元数据,用于所有版本的 Office(除非提供重写)。 -->

         <!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
         <!-- 重要事项!ID 对于外接程序必须是唯一的,如果重复使用该清单,请确保将此 ID 改为新的 GUID。 -->
         <Id>B913B9D4-9B2B-4907-948D-E0EF912AC4C8</Id>

         <!--Version. Updates from the store only get triggered if there is a version change. -->
         <!--版本。来自应用商店的更新只有在版本变化时才会被触发。 -->
         <Version>1.0.0.0</Version>
         <ProviderName>[RiceQuant RQData Excel Addin]</ProviderName>
         <DefaultLocale>zh-CN</DefaultLocale>
         <!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
         <!-- 外接程序的显示名称。在应用商店中使用,出现在外接程序对话框等 Office UI 中。 -->
         <DisplayName DefaultValue="RiceQuant RQData" />
         <Description DefaultValue="[RQdata Excel Addin 是为rqdata用户针对excel开发的插件,方便用户在excel中获取数据以及运算]"/>

         <!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
         <!-- 外接程序的图标。用于安装屏幕和外接程序对话框中。 -->
         <IconUrl DefaultValue="https://static.ricequant.com/data/excel-addin/assets/icon_open_panel.png" />
         <!-- Specifies the URL of the image that is used to represent your Office Add-in in the insertion UX and Office Store on high DPI screens. -->
         <!-- high dpi 设备使用 -->
         <!--<HighResolutionIconUrl DefaultValue="https://www.n.com:3000/assets/hi-res-icon.png"/>-->

         <!--If you plan to submit this add-in to the Office Store, uncomment the SupportUrl element below-->
         <SupportUrl DefaultValue="https://static.ricequant.com/data/excel-addin/index.html" />

         <!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
         <!-- 导航时允许使用的域。例如,如果使用 ShowTaskpane,然后得到一个 href 链接,则只有在此列表上存在该域时,才允许导航。 -->
         <AppDomains>
           <AppDomain>localhost:3000</AppDomain>
           <AppDomain>www.ricequant.com</AppDomain>
           <AppDomain>static.ricequant.com</AppDomain>
         </AppDomains>
         <!--End Basic Settings. -->

         <!--Begin TaskPane Mode integration. This section is used if there are no VersionOverrides or if the Office client version does not support add-in commands. -->
         <!--开始任务窗格模式集成。如果没有 VersionOverrides 或如果 Office 客户端版本不支持外接程序命令,将使用此部分。 -->
         <Hosts>
           <Host Name="Workbook" />
         </Hosts>
         <DefaultSettings>
           <SourceLocation DefaultValue="https://static.ricequant.com/data/excel-addin/index.html" />
         </DefaultSettings>
         <!-- End TaskPane Mode integration.  -->

         <Permissions>ReadWriteDocument</Permissions>

        <!-- Begin Add-in Commands Mode integration. -->
        <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">

          <!-- The Hosts node is required. -->
          <Hosts>
            <!-- Each host can have a different set of commands. -->
            <!-- Excel host is Workbook, Word host is Document, and PowerPoint host is Presentation. -->
            <!-- Make sure the hosts you override match the hosts declared in the top section of the manifest. -->
            <Host xsi:type="Workbook">
              <!-- Form factor. Currently only DesktopFormFactor is supported. -->
              <DesktopFormFactor>
                <!--"This code enables a customizable message to be displayed when the add-in is loaded successfully upon individual install."-->
                <GetStarted>
                  <!-- Title of the Getting Started callout. resid points to a ShortString resource -->
                  <Title resid="RqData.GetStarted.Title"/>

                  <!-- Description of the Getting Started callout. resid points to a LongString resource -->
                  <Description resid="RqData.GetStarted.Description"/>

                  <!-- Point to a url resource which details how the add-in should be used. -->
                  <LearnMoreUrl resid="RqData.GetStarted.LearnMoreUrl"/>
                </GetStarted>
                <!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called.
                  Think of the FunctionFile as the code behind ExecuteFunction. -->
                <!-- 考虑将React中的方法暴露出来,在这个文件调用 -->
                <FunctionFile resid="RqData.DesktopFunctionFile.Url" />

                <!-- PrimaryCommandSurface is the main Office Ribbon. -->
                <!-- PrimaryCommandSurface 为 Office 主功能区。上面的toolbar alertMessage-->
                <ExtensionPoint xsi:type="PrimaryCommandSurface">
                  <!-- 使用 OfficeTab 来扩展现有选项卡。使用 CustomTab 来创建新选项卡。 -->
                  <CustomTab id="TabRqData">
                    <!-- 显示panel -->
                    <Group id="RqData.ShowPanel">
                      <Label resid="RqData.ShowPanel.Label" />
                      <Icon>
                        <bt:Image size="16" resid="RqData.icon_open_panel" />
                        <bt:Image size="32" resid="RqData.icon_open_panel" />
                        <bt:Image size="80" resid="RqData.icon_open_panel" />
                      </Icon>
                      <Control xsi:type="Button" id="RqData.ShowPanelButton">
                        <Label resid="RqData.ShowPanelButton.Label" />
                        <Supertip>
                          <Title resid="RqData.ShowPanelButton.Label" />
                          <Description resid="RqData.ShowPanelButton.Tooltip" />
                        </Supertip>
                        <Icon>
                          <bt:Image size="16" resid="RqData.icon_open_panel" />
                          <bt:Image size="32" resid="RqData.icon_open_panel" />
                          <bt:Image size="80" resid="RqData.icon_open_panel" />
                        </Icon>
                        <Action xsi:type="ShowTaskpane">
                          <TaskpaneId>ButtonId1</TaskpaneId>
                          <!-- 提供将显示在任务窗格上的位置的 URL 资源 ID。 -->
                          <SourceLocation resid="RqData.ShowPanelButton.Url" />
                        </Action>
                      </Control>
                    </Group>


                    <!-- 数据引入 -->
                    <Group id="RqData.GroupInsetData">
                      <Label resid="RqData.GroupInsetDataLabel" />
                      <Icon>
                        <bt:Image size="16" resid="RqData.icon_inset_fn" />
                        <bt:Image size="32" resid="RqData.icon_inset_fn" />
                        <bt:Image size="80" resid="RqData.icon_inset_fn" />
                      </Icon>

                      <!-- 函数插入 -->
                      <Control xsi:type="Button" id="RqData.InsetFnButton">
                        <Label resid="RqData.InsetFnButton.Label" />
                        <Supertip>
                          <Title resid="RqData.InsetFnButton.Label" />
                          <Description resid="RqData.InsetFnButton.Tooltip" />
                        </Supertip>
                        <Icon>
                          <bt:Image size="16" resid="RqData.icon_inset_fn" />
                          <bt:Image size="32" resid="RqData.icon_inset_fn" />
                          <bt:Image size="80" resid="RqData.icon_inset_fn" />
                        </Icon>

                        <Action xsi:type="ExecuteFunction">
                          <FunctionName>linkToInsetFn</FunctionName>
                        </Action>
                      </Control>

                      <!-- 代码插入 -->
                      <Control xsi:type="Menu" id="RqData.InsetCodeMenu">
                        <Label resid="RqData.InsetCodeMenu.Label" />
                        <Supertip>
                          <Title resid="RqData.InsetCodeMenu.Label" />
                          <Description resid="RqData.InsetCodeMenu.Tooltip" />
                        </Supertip>
                        <Icon>
                          <bt:Image size="16" resid="RqData.icon_code_search" />
                          <bt:Image size="32" resid="RqData.icon_code_search" />
                          <bt:Image size="80" resid="RqData.icon_code_search" />
                        </Icon>
                        <Items>
                          <Item id="RqData.InsetCodeButton">
                            <Label resid="RqData.InsetCodeButton.Label"/>
                            <Supertip>
                              <Title resid="RqData.InsetCodeButton.Label" />
                              <Description resid="RqData.InsetCodeButton.Tooltip" />
                            </Supertip>
                            <Icon>
                              <bt:Image size="16" resid="RqData.icon_inset_C_Btn" />
                              <bt:Image size="32" resid="RqData.icon_inset_C_Btn" />
                              <bt:Image size="80" resid="RqData.icon_inset_C_Btn" />
                            </Icon>
                            <Action xsi:type="ExecuteFunction">
                              <FunctionName>linkToInsetCode</FunctionName>
                            </Action>
                          </Item>

                          <Item id="RqData.InsetDateButton">
                            <Label resid="RqData.InsetDateButton.Label"/>
                            <Supertip>
                              <Title resid="RqData.InsetDateButton.Label" />
                              <Description resid="RqData.InsetDateButton.Tooltip" />
                            </Supertip>
                            <Icon>
                              <bt:Image size="16" resid="RqData.icon_inset_D_Btn" />
                              <bt:Image size="32" resid="RqData.icon_inset_D_Btn" />
                              <bt:Image size="80" resid="RqData.icon_inset_D_Btn" />
                            </Icon>
                            <Action xsi:type="ExecuteFunction">
                              <FunctionName>linkToInsetDate</FunctionName>
                            </Action>
                          </Item>
                        </Items>
                      </Control>

                      <!-- 数据模板 -->
                      <Control xsi:type="Menu" id="RqData.DataModelMenu">
                        <Label resid="RqData.DataModelMenu.Label" />
                        <Supertip>
                          <Title resid="RqData.DataModelMenu.Label" />
                          <Description resid="RqData.DataModelMenu.Tooltip" />
                        </Supertip>
                        <Icon>
                          <bt:Image size="16" resid="RqData.icon_data_model" />
                          <bt:Image size="32" resid="RqData.icon_data_model" />
                          <bt:Image size="80" resid="RqData.icon_data_model" />
                        </Icon>
                        <Items>
                          <Item id="RqData.RealTimeQuoteBtn">
                            <Label resid="RqData.RealTimeQuoteBtn.Label"/>
                            <Supertip>
                              <Title resid="RqData.RealTimeQuoteBtn.Label" />
                              <Description resid="RqData.RealTimeQuoteBtn.Tooltip" />
                            </Supertip>
                            <Icon>
                              <bt:Image size="16" resid="RqData.icon_RTQ" />
                              <bt:Image size="32" resid="RqData.icon_RTQ" />
                              <bt:Image size="80" resid="RqData.icon_RTQ" />
                            </Icon>
                            <Action xsi:type="ExecuteFunction">
                              <FunctionName>linkToRealTimeQuote</FunctionName>
                            </Action>
                          </Item>

                          <Item id="RqData.HistoryQuoteBtn">
                            <Label resid="RqData.HistoryQuoteBtn.Label"/>
                            <Supertip>
                              <Title resid="RqData.HistoryQuoteBtn.Label" />
                              <Description resid="RqData.HistoryQuoteBtn.Tooltip" />
                            </Supertip>
                            <Icon>
                              <bt:Image size="16" resid="RqData.icon_HQ" />
                              <bt:Image size="32" resid="RqData.icon_HQ" />
                              <bt:Image size="80" resid="RqData.icon_HQ" />
                            </Icon>
                            <Action xsi:type="ExecuteFunction">
                              <FunctionName>linkToHistoryQuote</FunctionName>
                            </Action>
                          </Item>

                          <Item id="RqData.FSBtn">
                            <Label resid="RqData.FSBtn.Label"/>
                            <Supertip>
                              <Title resid="RqData.FSBtn.Label" />
                              <Description resid="RqData.FSBtn.Tooltip" />
                            </Supertip>
                            <Icon>
                              <bt:Image size="16" resid="RqData.icon_FS" />
                              <bt:Image size="32" resid="RqData.icon_FS" />
                              <bt:Image size="80" resid="RqData.icon_FS" />
                            </Icon>
                            <Action xsi:type="ExecuteFunction">
                              <FunctionName>linkToFinancialStatement</FunctionName>
                            </Action>
                          </Item>
                        </Items>
                      </Control>
                    </Group>

                    <!-- 数据管理 -->
                    <Group id="RqData.DataManageData">
                      <!-- 为组指定标签。resid 必须指向 ShortString 资源。 -->
                      <Label resid="RqData.DataManageDataLabel" />
                      <!--&lt;!&ndash; 图标。必需大小: 16、32、80,可选大小: 20、24、40、48、64。强烈建议为大 UX 提供所有大小。 &ndash;&gt;-->
                      <!--&lt;!&ndash; 使用 PNG 图标。资源部分中的所有 URL 必须使用 HTTPS。 &ndash;&gt;-->
                      <Icon>
                        <bt:Image size="16" resid="RqData.icon_refresh" />
                        <bt:Image size="32" resid="RqData.icon_refresh" />
                        <bt:Image size="80" resid="RqData.icon_refresh" />
                      </Icon>

                      <!-- 刷新数据 -->
                      <Control xsi:type="Button" id="RqData.RefreshButton">
                        <Label resid="RqData.RefreshButton.Label" />
                        <Supertip>
                          <Title resid="RqData.RefreshButton.Label" />
                          <Description resid="RqData.RefreshButton.Tooltip" />
                        </Supertip>
                        <Icon>
                          <bt:Image size="16" resid="RqData.icon_refresh" />
                          <bt:Image size="32" resid="RqData.icon_refresh" />
                          <bt:Image size="80" resid="RqData.icon_refresh" />
                        </Icon>

                        <Action xsi:type="ExecuteFunction">
                          <FunctionName>handleRefreshData</FunctionName>
                        </Action>
                      </Control>

                      <!-- 保存快照 -->
                      <Control xsi:type="Menu" id="RqData.SnapshotMenu">
                        <Label resid="RqData.SnapshotMenu.Label" />
                        <Supertip>
                          <Title resid="RqData.SnapshotMenu.Label" />
                          <Description resid="RqData.SnapshotMenu.Tooltip" />
                        </Supertip>
                        <Icon>
                          <bt:Image size="16" resid="RqData.icon_snapshot" />
                          <bt:Image size="32" resid="RqData.icon_snapshot" />
                          <bt:Image size="80" resid="RqData.icon_snapshot" />
                        </Icon>
                        <Items>
                          <Item id="RqData.SnapshotSheetBtn">
                            <Label resid="RqData.SnapshotSheetBtn.Label"/>
                            <Supertip>
                              <Title resid="RqData.SnapshotSheetBtn.Label" />
                              <Description resid="RqData.SnapshotSheetBtn.Tooltip" />
                            </Supertip>
                            <Icon>
                              <bt:Image size="16" resid="RqData.icon_snapshot_C" />
                              <bt:Image size="32" resid="RqData.icon_snapshot_C" />
                              <bt:Image size="80" resid="RqData.icon_snapshot_C" />
                            </Icon>
                            <Action xsi:type="ExecuteFunction">
                              <FunctionName>handleSheetSnapshot</FunctionName>
                            </Action>
                          </Item>

                          <Item id="RqData.SnapshotAllBtn">
                            <Label resid="RqData.SnapshotAllBtn.Label"/>
                            <Supertip>
                              <Title resid="RqData.SnapshotAllBtn.Label" />
                              <Description resid="RqData.SnapshotAllBtn.Tooltip" />
                            </Supertip>
                            <Icon>
                              <bt:Image size="16" resid="RqData.icon_snapshot_A" />
                              <bt:Image size="32" resid="RqData.icon_snapshot_A" />
                              <bt:Image size="80" resid="RqData.icon_snapshot_A" />
                            </Icon>
                            <Action xsi:type="ExecuteFunction">
                              <FunctionName>handleAllSnapshot</FunctionName>
                            </Action>
                          </Item>
                        </Items>
                      </Control>
                    </Group>

                    <!-- 标题 -->
                    <Label resid="RqData.toolbarTitle"/>
                  </CustomTab>
                </ExtensionPoint>

              </DesktopFormFactor>
            </Host>
          </Hosts>

          <!-- You can use resources across hosts and form factors. -->
          <Resources>
            <bt:Images>
              <bt:Image id="RqData.icon_open_panel" DefaultValue="https://static.ricequant.com/data/excel-addin/assets/icon_open_panel.png" />
              <bt:Image id="RqData.icon_inset_fn" DefaultValue="https://static.ricequant.com/data/excel-addin/assets/icon_inset_fn.png" />
              <bt:Image id="RqData.icon_code_search" DefaultValue="https://static.ricequant.com/data/excel-addin/assets/icon_code_search.png" />
              <bt:Image id="RqData.icon_inset_C_Btn" DefaultValue="https://static.ricequant.com/data/excel-addin/assets/icon_inset_C_Btn.png" />
              <bt:Image id="RqData.icon_inset_D_Btn" DefaultValue="https://static.ricequant.com/data/excel-addin/assets/icon_inset_D_Btn.png" />
              <bt:Image id="RqData.icon_data_model" DefaultValue="https://static.ricequant.com/data/excel-addin/assets/icon_data_model.png" />
              <bt:Image id="RqData.icon_RTQ" DefaultValue="https://static.ricequant.com/data/excel-addin/assets/icon_RTQ.png" />
              <bt:Image id="RqData.icon_HQ" DefaultValue="https://static.ricequant.com/data/excel-addin/assets/icon_HQ.png" />
              <bt:Image id="RqData.icon_FS" DefaultValue="https://static.ricequant.com/data/excel-addin/assets/icon_FS.png" />
              <bt:Image id="RqData.icon_refresh" DefaultValue="https://static.ricequant.com/data/excel-addin/assets/icon_refresh.png" />
              <bt:Image id="RqData.icon_snapshot" DefaultValue="https://static.ricequant.com/data/excel-addin/assets/icon_snapshot.png" />
              <bt:Image id="RqData.icon_snapshot_C" DefaultValue="https://static.ricequant.com/data/excel-addin/assets/icon_snapshot_C.png" />
              <bt:Image id="RqData.icon_snapshot_A" DefaultValue="https://static.ricequant.com/data/excel-addin/assets/icon_snapshot_A.png" />
              <bt:Image id="RqData.icon_model_tool" DefaultValue="https://static.ricequant.com/data/excel-addin/assets/icon_model_tool.png" />

            </bt:Images>
            <bt:Urls>

              <bt:Url id="RqData.ShowPanelButton.Url" DefaultValue="https://static.ricequant.com/data/excel-addin/index.html" />
              <bt:Url id="RqData.GetStarted.LearnMoreUrl" DefaultValue="https://ricequant.com" />
              <bt:Url id="RqData.DesktopFunctionFile.Url" DefaultValue="https://static.ricequant.com/data/excel-addin/function-file.html" />

            </bt:Urls>
            <!-- ShortStrings max characters==125. -->
            <bt:ShortStrings>
              <bt:String id="RqData.ShowPanel.Label" DefaultValue="SideBar" />
              <bt:String id="RqData.ShowPanelButton.Label" DefaultValue="显示" />
              <bt:String id="RqData.InsetFnButton.Label" DefaultValue="函数插入" />
              <bt:String id="RqData.InsetCodeMenu.Label" DefaultValue="代码插入" />
              <bt:String id="RqData.InsetCodeButton.Label" DefaultValue="代码插入" />
              <bt:String id="RqData.InsetDateButton.Label" DefaultValue="日期插入" />
              <bt:String id="RqData.DataModelMenu.Label" DefaultValue="数据模板" />
              <bt:String id="RqData.RealTimeQuoteBtn.Label" DefaultValue="实时行情" />
              <bt:String id="RqData.HistoryQuoteBtn.Label" DefaultValue="历史行情" />
              <bt:String id="RqData.FSBtn.Label" DefaultValue="财务报表" />
              <!--<bt:String id="RqData.DataModelButton.Label" DefaultValue="数据模板" />-->
              <bt:String id="RqData.RefreshButton.Label" DefaultValue="刷新数据" />
              <bt:String id="RqData.SnapshotMenu.Label" DefaultValue="保存快照" />
              <bt:String id="RqData.SnapshotSheetBtn.Label" DefaultValue="当前sheet" />
              <bt:String id="RqData.SnapshotAllBtn.Label" DefaultValue="当前文件" />
              <!--<bt:String id="RqData.alertBtn.Label" DefaultValue="alertBtn" />-->
              <bt:String id="RqData.Group1Label" DefaultValue="第一组" />
              <bt:String id="RqData.GroupInsetDataLabel" DefaultValue="数据引入" />
              <bt:String id="RqData.DataManageDataLabel" DefaultValue="数据管理" />
              <bt:String id="RqData.GetStarted.Title" DefaultValue="RiceQuant 插件载入成功!" />
              <bt:String id="RqData.toolbarTitle" DefaultValue="RqData" />

              <bt:String id="RqData.GetStarted.Title" DefaultValue="RiceQuant 插件载入成功"/>
            </bt:ShortStrings>
            <!-- LongStrings max characters==250. -->
            <bt:LongStrings>
              <bt:String id="RqData.ShowPanel.Tooltip" DefaultValue="SideBar" />
              <bt:String id="RqData.ShowPanelButton.Tooltip" DefaultValue="点击打开侧边栏" />
              <bt:String id="RqData.InsetFnButton.Tooltip" DefaultValue="插入函数" />
              <bt:String id="RqData.InsetCodeMenu.Tooltip" DefaultValue="插入代码或者日期" />
              <bt:String id="RqData.InsetCodeButton.Tooltip" DefaultValue="插入代码" />
              <bt:String id="RqData.InsetDateButton.Tooltip" DefaultValue="插入日期" />
              <bt:String id="RqData.DataModelMenu.Tooltip" DefaultValue="数据模板" />
              <bt:String id="RqData.RealTimeQuoteBtn.Tooltip" DefaultValue="实时行情" />
              <bt:String id="RqData.HistoryQuoteBtn.Tooltip" DefaultValue="历史行情" />
              <bt:String id="RqData.FSBtn.Tooltip" DefaultValue="财务报表" />
              <!--<bt:String id="RqData.DataModelButton.Tooltip" DefaultValue="数据模板" />-->
              <bt:String id="RqData.RefreshButton.Tooltip" DefaultValue="刷新数据" />
              <bt:String id="RqData.SnapshotMenu.Tooltip" DefaultValue="保存快照" />
              <bt:String id="RqData.SnapshotSheetBtn.Tooltip" DefaultValue="保存当前sheet为快照" />
              <bt:String id="RqData.SnapshotAllBtn.Tooltip" DefaultValue="保存整个文件为快照" />
              <!--<bt:String id="RqData.alertBtn.Tooltip" DefaultValue="alertBtn tooltip" />-->
              <bt:String id="RqData.GetStarted.Description" DefaultValue="请点击【显示】按钮显示插件面板" />
            </bt:LongStrings>
          </Resources>
        </VersionOverrides>
        <!-- End Add-in Commands Mode integration. -->

      </OfficeApp>

于 2018 年 6 月 7 日添加。

我发现,在我debug通过visual studio 2017. 有一些config变了vs 2017

4

0 回答 0