examples/headers.rb in write_xlsx-1.09.4 vs examples/headers.rb in write_xlsx-1.09.5
- old
+ new
@@ -40,11 +40,10 @@
require 'write_xlsx'
workbook = WriteXLSX.new('headers.xlsx')
preview = 'Select Print Preview to see the header and footer'
-
######################################################################
#
# A simple example to start
#
worksheet1 = workbook.add_worksheet('Simple')
@@ -55,11 +54,10 @@
worksheet1.set_footer(footer1)
worksheet1.set_column('A:A', 50)
worksheet1.write('A1', preview)
-
######################################################################
#
# This is an example of some of the header/footer variables.
#
worksheet2 = workbook.add_worksheet('Variables')
@@ -72,26 +70,24 @@
worksheet2.set_column('A:A', 50)
worksheet2.write('A1', preview)
worksheet2.write('A21', 'Next sheet')
worksheet2.set_h_pagebreaks(20)
-
######################################################################
#
# This example shows how to use more than one font
#
worksheet3 = workbook.add_worksheet('Mixed fonts')
-header3 = %q(&C&"Courier New,Bold"Hello &"Arial,Italic"World)
-footer3 = %q(&C&"Symbol"e&"Arial" = mc&X2)
+header3 = '&C&"Courier New,Bold"Hello &"Arial,Italic"World'
+footer3 = '&C&"Symbol"e&"Arial" = mc&X2'
worksheet3.set_header(header3)
worksheet3.set_footer(footer3)
worksheet3.set_column('A:A', 50)
worksheet3.write('A1', preview)
-
######################################################################
#
# Example of line wrapping
#
worksheet4 = workbook.add_worksheet('Word wrap')
@@ -99,10 +95,9 @@
worksheet4.set_header(header4)
worksheet4.set_column('A:A', 50)
worksheet4.write('A1', preview)
-
######################################################################
#
# Example of inserting a literal ampersand &
#