Enum TextStrikeType

TextStrikeType enumeration

This type specifies the strike type.

public enum TextStrikeType

Values

NameValueDescription
Single0A single strikethrough applied on the text.
Double1A double strikethrough applied on the text. Only works for the text of the shapes or charts.
None2No strike is applied to the text.

Examples

[C#]

namespace Demos
{
    using Aspose.Cells;
    using System;

    public class TextStrikeTypeDemo
    {
        public static void TextStrikeTypeExample()
        {
            // Create a new workbook
            Workbook workbook = new Workbook();
            // Obtain the reference of the first worksheet
            Worksheet worksheet = workbook.Worksheets[0];
            // Accessing the "A1" cell from the worksheet
            Cell cell = worksheet.Cells["A1"];
            // Adding some value to the "A1" cell
            cell.PutValue("Hello Aspose!");

            // Accessing the font of the cell
            Style style = cell.GetStyle();
            Font font = style.Font;

            // Setting the strike type to Single
            font.StrikeType = TextStrikeType.Single;

            // Apply the style to the cell
            cell.SetStyle(style);

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

See Also