Enum BuiltinStyleType

BuiltinStyleType enumeration

Represents all built-in style types.

public enum BuiltinStyleType

Values

NameValueDescription
TwentyPercentAccent130
TwentyPercentAccent234
TwentyPercentAccent338
TwentyPercentAccent442
TwentyPercentAccent546
TwentyPercentAccent650
FortyPercentAccent131
FortyPercentAccent235
FortyPercentAccent339
FortyPercentAccent443
FortyPercentAccent547
FortyPercentAccent651
SixtyPercentAccent132
SixtyPercentAccent236
SixtyPercentAccent340
SixtyPercentAccent444
SixtyPercentAccent548
SixtyPercentAccent652
Accent129
Accent233
Accent337
Accent441
Accent545
Accent649
Bad27
Calculation22
CheckCell23
Comma3
Comma16
Currency4
Currency17
ExplanatoryText53
Good26
Header116
Header217
Header318
Header419
Hyperlink8
FollowedHyperlink9
Input20
LinkedCell24
Neutral28
Normal0
Note10
Output21
Percent5
Title15
Total25
WarningText11
RowLevel1
ColumnLevel2

Examples

[C#]

namespace Demos
{
    using Aspose.Cells;
    using System;

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

            // Apply different built-in styles to cells
            Style style;

            // Apply Normal style
            style = workbook.CreateBuiltinStyle(BuiltinStyleType.Normal);
            worksheet.Cells["A1"].SetStyle(style);
            worksheet.Cells["A1"].PutValue("Normal Style");

            // Apply Title style
            style = workbook.CreateBuiltinStyle(BuiltinStyleType.Title);
            worksheet.Cells["A2"].SetStyle(style);
            worksheet.Cells["A2"].PutValue("Title Style");

            // Apply Header1 style
            style = workbook.CreateBuiltinStyle(BuiltinStyleType.Header1);
            worksheet.Cells["A3"].SetStyle(style);
            worksheet.Cells["A3"].PutValue("Header1 Style");

            // Apply Currency style
            style = workbook.CreateBuiltinStyle(BuiltinStyleType.Currency);
            worksheet.Cells["A4"].SetStyle(style);
            worksheet.Cells["A4"].PutValue(1234.56);

            // Apply Percent style
            style = workbook.CreateBuiltinStyle(BuiltinStyleType.Percent);
            worksheet.Cells["A5"].SetStyle(style);
            worksheet.Cells["A5"].PutValue(0.56);

            style = workbook.CreateBuiltinStyle(BuiltinStyleType.FortyPercentAccent1);
            worksheet.Cells["A6"].SetStyle(style);
            worksheet.Cells["A6"].PutValue(0.5555);

            style = workbook.CreateBuiltinStyle(BuiltinStyleType.Accent1);
            worksheet.Cells["A7"].SetStyle(style);
            worksheet.Cells["A7"].PutValue(0.5555);


            style = workbook.CreateBuiltinStyle(BuiltinStyleType.Hyperlink);
            worksheet.Cells["A8"].SetStyle(style);
            worksheet.Cells["A8"].PutValue(0.5555);

            style = workbook.CreateBuiltinStyle(BuiltinStyleType.SixtyPercentAccent1);
            worksheet.Cells["A8"].SetStyle(style);
            worksheet.Cells["A8"].PutValue(0.5555);

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

See Also