Get Started
Usage API

GetLocale

GetLocale() → { number }

Returns current locale id.

Parameters:

This method doesn't have any parameters.

Returns:

Type
number

Example

Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
Api.SetLocale("en-CA");
oLocale = Api.GetLocale();
oWorksheet.GetRange("A1").SetValue("Locale: " + oLocale);
builder.SaveFile("xlsx", "GetLocale.xlsx");
builder.CloseFile();

Resulting document