Enum FontSchemeType

FontSchemeType enumeration

Represents the scheme type of the font.

public enum FontSchemeType

Values

NameValueDescription
None0None
Major1Major scheme.
Minor2Minor scheme.

Examples

[C#]

namespace Demos
{
    using Aspose.Cells;
    using System;

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

            // Access the font of the cell style
            Aspose.Cells.Font font = cell.GetStyle().Font;

            // Setting the font scheme type to Major
            font.SchemeType = FontSchemeType.Major;

            // Setting other font properties for demonstration
            font.Name = "Arial";
            font.Size = 14;
            font.Color = System.Drawing.Color.Blue;

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

See Also