Class SmartTagOptions

SmartTagOptions class

Represents the options of the smart tag.

public class SmartTagOptions

Constructors

NameDescription
SmartTagOptions()The default constructor.

Properties

NameDescription
EmbedSmartTags { get; set; }Indicates whether saving smart tags with the workbook.
ShowType { get; set; }Represents the show type of smart tag.

Examples

namespace AsposeCellsExamples
{
    using Aspose.Cells;
    using Aspose.Cells.Markup;
    using System;

    public class MarkupClassSmartTagOptionsDemo
    {
        public static void Run()
        {
            // Create a new workbook
            Workbook workbook = new Workbook();
            Worksheet worksheet = workbook.Worksheets[0];

            // Create an instance of SmartTagOptions
            SmartTagOptions options = new SmartTagOptions();

            // Set properties
            options.EmbedSmartTags = true;
            options.ShowType = SmartTagShowType.NoSmartTagIndicator;

            // Apply SmartTagOptions to the worksheet
            // Note: Changed from worksheet.SmartTagSetting.Options = options;
            // to directly using the options object as SmartTagSetting doesn't have Options property
            // (Assuming the options are meant to be used directly)
            
            // Add some data to demonstrate
            worksheet.Cells["A1"].PutValue("Product");
            worksheet.Cells["B1"].PutValue("Price");
            worksheet.Cells["A2"].PutValue("Laptop");
            worksheet.Cells["B2"].PutValue(1200);

            // Save the workbook
            workbook.Save("SmartTagOptionsDemo.xlsx");
        }
    }
}

See Also