Class WebExtension

WebExtension class

Represents an Office Add-in instance.

public class WebExtension

Properties

NameDescription
AlterReferences { get; }Gets a list of alter references.
Bindings { get; }Gets all bindings relationship between an Office Add-in and the data in the document.
Id { get; set; }Gets and sets the uniquely identifies the Office Add-in instance in the current document.
IsFrozen { get; set; }Indicates whether the user can interact with the Office Add-in or not.
Properties { get; }Gets all properties of web extension.
Reference { get; }Get the primary reference to an Office Add-in.

Examples

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

namespace AsposeCellsExamples
{
    public class WebExtensionsClassWebExtensionDemo
    {
        public static void Run()
        {
            Workbook workbook = new Workbook();
            WebExtensionCollection webExtensions = workbook.Worksheets.WebExtensions;
            int index = webExtensions.Add();
            WebExtension webExt = webExtensions[index];
            webExt.Reference.Id = "youtube";
            webExt.Reference.StoreName = "YouTube";
            
            webExt.Properties.Add("videoUrl", "https://www.youtube.com/watch?v=z0hFbzPPfm8");
            
            ShapeCollection shapes = workbook.Worksheets[0].Shapes;
            shapes.AddShape(MsoDrawingType.WebExtension, 0, 0, 0, 0, 410, 730);
            WebExtensionShape wShape = (WebExtensionShape)shapes[0];
            wShape.WebExtension = webExt;
            
            workbook.Save("WebExtensionDemo.xlsx");
        }
    }
}

See Also