SetLocale

SetLocale(LCID)

Sets a locale to the document.

Parameters:

Name Type Description
LCID number

The locale specified.

Returns:

This method doesn't return any data.

Example

Copy code
builder.CreateFile("xlsx");
var 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