Enum CountryCode

CountryCode enumeration

Represents Excel country identifiers.

public enum CountryCode

Values

NameValueDescription
Default0
USA1United States
Canada2Canada
LatinAmeric3Latin America, except Brazil
Russia7Russia
Egypt20Egypt
Greece30Greece
Netherlands31Netherlands
Belgium32Belgium
France33France
Spain34Spain
Hungary36Hungary
Italy39Italy
Switzerland41Switzerland
Austria43Austria
UnitedKingdom44United Kingdom
Denmark45Denmark
Sweden46Sweden
Norway47Norway
Poland48Poland
Germany49Germany
Mexico52Mexico
Brazil55Brazil
Australia61Australia
NewZealand64New Zealand
Thailand66Thailand
Japan81Japan
SouthKorea82SouthKorea
VietNam84Viet Nam
China86People’s Republic of China
Turkey90Turkey
India91India
Algeria213Algeria
Morocco216Morocco
Libya218Libya
Portugal351Portugal
Iceland354Iceland
Finland358Finland
Czech420Czech Republic
Taiwan886Taiwan
Lebanon961Lebanon
Jordan962Jordan
Syria963Syria
Iraq964Iraq
Kuwait965Kuwait
Saudi966Saudi Arabia
UnitedArabEmirates971United Arab Emirates
Israel972Israel
Qatar974Qatar
Iran981Iran

Examples

[C#]

namespace Demos
{
    using Aspose.Cells;
    using System;

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

            // Set the country code for the workbook
            workbook.Settings.LanguageCode = CountryCode.USA;
            workbook.Settings.Region = CountryCode.USA;

            // Add some data to the worksheet
            worksheet.Cells[0, 0].PutValue("Country");
            worksheet.Cells[0, 1].PutValue("Code");

            worksheet.Cells[1, 0].PutValue("United States");
            worksheet.Cells[1, 1].PutValue((int)CountryCode.USA);

            worksheet.Cells[2, 0].PutValue("Canada");
            worksheet.Cells[2, 1].PutValue((int)CountryCode.Canada);

            worksheet.Cells[3, 0].PutValue("France");
            worksheet.Cells[3, 1].PutValue((int)CountryCode.France);

            worksheet.Cells[4, 0].PutValue("Germany");
            worksheet.Cells[4, 1].PutValue((int)CountryCode.Germany);

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

See Also