TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

SetItalic

SetItalic(isItalic)

Sets the italic property to the text characters in the current cell or cell range.

Parameters:

Name Type Description
isItalic boolean

Specifies that the contents of the current cell / cell range are displayed italicized.

Returns:

This method doesn't return any data.

Example

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

Resulting document