Method: Writeexcel::Format#set_font
- Defined in:
- lib/writeexcel/format.rb
#set_font(fontname) ⇒ Object
Default state: Font is Arial
Default action: None
Valid args: Any valid font name
Specify the font used:
format.set_font('Times New Roman');
Excel can only display fonts that are installed on the system that it is running on. Therefore it is best to use the fonts that come as standard such as ‘Arial’, ‘Times New Roman’ and ‘Courier New’. See also the Fonts worksheet created by formats.rb
1298 1299 1300 |
# File 'lib/writeexcel/format.rb', line 1298 def set_font(fontname) @font = fontname end |