Method: Writeexcel::Format#set_text_wrap
- Defined in:
- lib/writeexcel/format.rb
#set_text_wrap(arg = 1) ⇒ Object
Default state: Text wrap is off
Default action: Turn text wrap on
Valid args: 0, 1
Here is an example using the text wrap property, the escape character n is used to indicate the end of line:
format = workbook.add_format()
format.set_text_wrap()
worksheet.write(0, 0, "It's\na bum\nwrap", format)
1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 |
# File 'lib/writeexcel/format.rb', line 1026 def set_text_wrap(arg = 1) begin if arg == 0 then @text_wrap = 0 elsif arg == 1 then @text_wrap = 1 else raise ArgumentError, "\n\n set_text_wrap(#{arg.inspect})\n arg must be 0, 1, or none.\n" " ( 0:OFF, 1 and none:text wrap On )\n" end end end |