Class WebExtensionTaskPane

WebExtensionTaskPane class

Represents a persisted taskpane object.

public class WebExtensionTaskPane

Properties

NameDescription
DockState { get; set; }Gets and sets the last-docked location of this taskpane object.
IsLocked { get; set; }Indicates whether the taskpane is locked to the document in the UI and cannot be closed by the user.
IsVisible { get; set; }Indicates whether the Task Pane shows as visible by default when the document opens.
Row { get; set; }Gets and sets the index, enumerating from the outside to the inside, of this taskpane among other persisted taskpanes docked in the same default location.
WebExtension { get; set; }Gets and sets the web extension part associated with the taskpane instance
Width { get; set; }Gets and sets the default width value for this taskpane instance.

Examples

using System;
using Aspose.Cells;
using Aspose.Cells.WebExtensions;

namespace AsposeCellsExamples
{
    public class WebExtensionsClassWebExtensionTaskPaneDemo
    {
        public static void Run()
        {
            Workbook workbook = new Workbook();
            WebExtensionCollection webExtensions = workbook.Worksheets.WebExtensions;
            int webExtIndex = webExtensions.Add();
            WebExtension webExt = webExtensions[webExtIndex];
            
            webExt.Reference.Version = "1.0.6.28";
            webExt.Reference.StoreName = @"\\wanlink.us\DFSRoot\APPS\meZocliq\UAT\Excel_Addin\";
            webExt.Reference.StoreType = WebExtensionStoreType.FileSystem;
            webExt.Properties.Add("Office.AutoShowTaskpaneWithDocument", "true");

            WebExtensionTaskPaneCollection taskPanes = workbook.Worksheets.WebExtensionTaskPanes;
            int taskPaneIndex = taskPanes.Add();
            WebExtensionTaskPane taskPane = taskPanes[taskPaneIndex];

            taskPane.WebExtension = webExt;
            taskPane.DockState = "right";
            taskPane.IsVisible = true;
            taskPane.Width = 350;
            taskPane.Row = 7;

            workbook.Save("WebExtensionTaskPaneDemo.xlsx");
        }
    }
}

See Also