【问题标题】:Office 2013 JavaScript API - Remove Table Filter ButtonsOffice 2013 JavaScript API - 删除表格筛选器按钮
【发布时间】:2017-01-16 10:11:26
【问题描述】:

我无法删除表格过滤器按钮
,
我正在使用下面的代码

Office.context.document.setSelectedDataAsync(sampleDataForExcel, { tableOptions: { filterButton: false } },
            function (asyncResult) {
                if (asyncResult.status === Office.AsyncResultStatus.Failed) {
                    app.showNotification('Could not insert sample data',
                        'Please choose a different selection range.');
                } else {
                    Office.context.document.bindings.addFromSelectionAsync(
                        Office.BindingType.Table, { id: "myBinding" },
                        function (asyncResult) {
                            if (asyncResult.status === Office.AsyncResultStatus.Failed) {
                                app.showNotification('Error binding data');
                            } else {
                                window.location.href = '../index.html';
                            }
                        }
                    );
                }
            }
        );

【问题讨论】:

    标签: excel office-addins office-js office-2013


    【解决方案1】:

    我刚刚尝试过,但使用以下示例在我的机器上运行良好:

    Office.context.document.setSelectedDataAsync(myTable,
        {
            coercionType: Office.CoercionType.Table,
            tableOptions: { filterButton: false }
        }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-17
      • 2013-12-10
      • 1970-01-01
      • 2012-07-18
      相关资源
      最近更新 更多