From 282eec44ef01746ee25931fa6cd287ad083fd40b Mon Sep 17 00:00:00 2001 From: Zsolt Kozaroczy Date: Fri, 11 Sep 2020 00:36:29 +0200 Subject: Restructure examples folder (#47) Split examples into separate markdown files, each containing a description, sample code, and a screenshot of the resulting xlsx document. The script `generate.rb` is provided to actually generate the example documents by executing the sample code contained in the markdown files. --- examples/wrap_text.rb | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 examples/wrap_text.rb (limited to 'examples/wrap_text.rb') diff --git a/examples/wrap_text.rb b/examples/wrap_text.rb deleted file mode 100644 index c2e1aeb5..00000000 --- a/examples/wrap_text.rb +++ /dev/null @@ -1,21 +0,0 @@ -$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib" -require 'axlsx' -p = Axlsx::Package.new -p.workbook do |wb| - wb.styles do |s| - wrap_text = s.add_style :fg_color=> "FFFFFF", - :b => true, - :bg_color => "004586", - :sz => 12, - :border => { :style => :thin, :color => "00" }, - :alignment => { :horizontal => :center, - :vertical => :center , - :wrap_text => true} - wb.add_worksheet(:name => 'wrap text') do |sheet| - sheet.add_row ['Torp, White and Cronin'], :style => wrap_text - # Forcing the column to be a bit narrow so we can see if the text wrap. - sheet.column_info.first.width = 5 - end - end -end -p.serialize 'wrap_text.xlsx' -- cgit v1.2.3