Office 2013 JavaScript API — удаление кнопок фильтра таблицы

Мне не удалось удалить кнопку "Фильтр таблиц"
введите здесь описание изображения,
Я использую приведенный ниже код

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';
                            }
                        }
                    );
                }
            }
        );

person ozil    schedule 08.09.2016    source источник


Ответы (1)


Я только что попробовал, но он отлично работает на моей машине, используя следующий пример:

Office.context.document.setSelectedDataAsync(myTable,
    {
        coercionType: Office.CoercionType.Table,
        tableOptions: { filterButton: false }
    }
person Philip Rueker    schedule 08.09.2016