TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

GetLocale

GetLocale() → { number }

Returns the current locale ID.

Parameters:

This method doesn't have any parameters.

Returns:

Type
number

Example

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

Resulting document