SetStrikeout

SetStrikeout(isStrikeout)

Specifies that the contents of the cell / cell range are displayed with a single horizontal line through the center of the contents.

Parameters:

Name Type Description
isStrikeout boolean

Specifies if the contents of the current cell / cell range are displayed struck through.

Returns:

This method doesn't return any data.

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
oWorksheet.GetRange("A2").SetValue("Struckout text");
oWorksheet.GetRange("A2").SetStrikeout(true);
oWorksheet.GetRange("A3").SetValue("Normal text");
builder.SaveFile("xlsx", "SetStrikeout.xlsx");
builder.CloseFile();

Resulting document