跳到主要内容

Make cell font bold

Sets the font of the cell A2 to bold.

(function()
{
Api.GetActiveSheet().GetRange("A2").SetBold(true);
})();

Methods used: GetActiveSheet, GetRange, SetBold

Reference Microsoft VBA macro code

Sub example()
Range("A2").Font.Bold = True
End Sub

Result

Font boldFont bold