Skip to main content

SetUnderline

Specifies that the contents of the current cell / cell range are displayed along with a line appearing directly below the character.

Syntax

expression.SetUnderline(undelineType);

expression - A variable that represents a ApiRange class.

Parameters

NameRequired/OptionalData typeDefaultDescription
undelineTypeRequired'none''single''singleAccounting'

Returns

This method doesn't return any data.

Example

This example specifies that the contents of the current cell is displayed along with a line appearing directly below the character.

var oWorksheet = Api.GetActiveSheet();
oWorksheet.GetRange("A2").SetValue("The text underlined with a single line");
oWorksheet.GetRange("A2").SetUnderline("single");
oWorksheet.GetRange("A4").SetValue("Normal text");