set_font 

This method sets the font for the specified range. The font used is one of the family to which the specified font belongs.

CALL METHOD spreadsheet->set_font
       EXPORTING rangename = rangename
                 family    = family
                 size      = size
                 bold      = bold
                 italic    = italic
                 align     = align
                 no_flush  = no_flush
       IMPORTING error     = error
                 retcode   = retcode.

Description of parameters

Parameter

Optional

Description

rangename

 

Area name

family

 

Font. The following fonts are currently available:

'Arial'

'Courier New'

'Times New Roman'

size

 

Font size

'-1' : Unchanged

bold

 

'1' : Bold

'0' : Normal

'-1' : Unchanged

italic

 

'1' : Italic

'0' : Normal

'-1' : Unchanged

align

 

Alignment:

  • '-1' : Unchanged
  • '0' : Right-justified
  • '1' : Centered
  • '2' : Left-justified