SetBold
Set the bold property to the text characters in the current cell or cell range.
Parameters:
Name |
Type |
Description |
isBold |
bool
|
Specifies that the contents of this cell/cell range are displayed bold. |
Example
Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
oWorksheet.GetRange("A2").SetValue("Bold text");
oWorksheet.GetRange("A2").SetBold(true);
oWorksheet.GetRange("A3").SetValue("Normal text");
builder.SaveFile("xlsx", "SetBold.xlsx");
builder.CloseFile();
Resulting document