Get Started
Documentation

SetLocale

SetLocale(LCID)

Set locale for document.

Parameters:

Name Type Description
LCID number

Returns:

This method doesn't return any data.

Example

Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
Api.SetLocale("en-CA");
oWorksheet.GetRange("A1").SetValue("A sample spreadsheet with the language set to English (Canada).");
builder.SaveFile("xlsx", "SetLocale.xlsx");
builder.CloseFile();

Resulting document