NativeExcel2 for .Net Developer's Reference

IFont.Strikethrough Property

Gets or sets a value that indicates whether the font is struck through with a horizontal line.

[Visual Basic]
PropertyStrikethroughAsBoolean
[C#]
boolStrikethrough{get;set;}
[C++]
__propertyboolget_Strikethrough();
__propertyvoidset_Strikethrough(bool);
[JScript]
functiongetStrikethrough():bool
functionsetStrikethrough(bool);

Property Value

true if the font is struck through with a horizontal line; otherwise, false.

Example

This example sets the font style to strikethrough for the range A1:A5 on sheet one.

[C#]
book.Worksheets[1].Range["A1:A5"].Font.Strikethrough = true;
[VisualBasic]
book.Worksheets(1).Range("A1:A5").Font.Strikethrough = true
[C++]
book->Worksheets->Item[1]->Range->Item[S"A1:A5"]->Font->Strikethrough = true;

See Also

IFont Interface | NativeExcel Namespace