Enum FontUnderlineType

FontUnderlineType enumeration

Enumerates the font underline types.

public enum FontUnderlineType

Values

NameValueDescription
None0Represents no underline.
Single1Represents single underline.
Double2Represents double underline.
Accounting3Represents single accounting underline.
DoubleAccounting4Represents double accounting underline.
Dash5Represents Dashed Underline
DashDotDotHeavy6Represents Thick Dash-Dot-Dot Underline
DashDotHeavy7Represents Thick Dash-Dot Underline
DashedHeavy8Represents Thick Dashed Underline
DashLong9Represents Long Dashed Underline
DashLongHeavy10Represents Thick Long Dashed Underline
DotDash11Represents Dash-Dot Underline
DotDotDash12Represents Dash-Dot-Dot Underline
Dotted13Represents Dotted Underline
DottedHeavy14Represents Thick Dotted Underline
Heavy15Represents Thick Underline
Wave16Represents Wave Underline
WavyDouble17Represents Double Wave Underline
WavyHeavy18Represents Heavy Wave Underline
Words19Represents Underline Non-Space Characters Only

Examples

[C#]

namespace Demos
{
    using Aspose.Cells;
    using System;

    public class FontUnderlineTypeDemo
    {
        public static void FontUnderlineTypeExample()
        {
            // 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!");

            // Get the style of the cell
            Style style = cell.GetStyle();
            
            // Set the font underline type to single underline
            style.Font.Underline = FontUnderlineType.Single;
            
            // Apply the style to the cell
            cell.SetStyle(style);

            // Save the workbook
            workbook.Save("FontUnderlineTypeExample.xlsx");
            workbook.Save("FontUnderlineTypeExample.pdf");
        }
    }
}

See Also