Get Started
Documentation

SetStrikeout

SetStrikeout(isStrikeout)

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

Parameters:

Name Type Description
isStrikeout boolean Specifies that the contents of the current cell/cell range are displayed struck through.

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