Sha256: 9fee7d3c433a386d8a4c1bee40d4a879f1b3e3e2f9a1c226e9afa4c4a489a9c5

Contents?: true

Size: 1.06 KB

Versions: 33

Compression:

Stored size: 1.06 KB

Contents

#!/usr/bin/ruby -w
# -*- coding: utf-8 -*-

##############################################################################
#
# A simple formatting example using WriteExcel.
#
# This program demonstrates the diagonal border cell format.
#
# reverse('©'), May 2004, John McNamara, jmcnamara@cpan.org
#
# original written in Perl by John McNamara
# converted to Ruby by Hideo Nakamura, cxn03651@msj.biglobe.ne.jp
#

require 'rubygems'
require 'writeexcel'

workbook  = WriteExcel.new('diag_border.xls')
worksheet = workbook.add_worksheet

format1   = workbook.add_format(:diag_type       => 1)
format2   = workbook.add_format(:diag_type       => 2)
format3   = workbook.add_format(:diag_type       => 3)
format4   = workbook.add_format(
                              :diag_type       => 3,
                              :diag_border     => 7,
                              :diag_color      => 'red'
            )

worksheet.write('B3',  'Text', format1)
worksheet.write('B6',  'Text', format2)
worksheet.write('B9',  'Text', format3)
worksheet.write('B12', 'Text', format4)

workbook.close

Version data entries

33 entries across 33 versions & 3 rubygems

Version Path
writeexcel-1.0.4 examples/diag_border.rb
writeexcel-1.0.3 examples/diag_border.rb
writeexcel-1.0.2 examples/diag_border.rb
writeexcel-1.0.1 examples/diag_border.rb
writeexcel-1.0.0 examples/diag_border.rb
writeexcel-0.6.19 examples/diag_border.rb
writeexcel-0.6.18 examples/diag_border.rb
writeexcel-0.6.17 examples/diag_border.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.16/examples/diag_border.rb
writeexcel-0.6.16 examples/diag_border.rb
writeexcel-0.6.15 examples/diag_border.rb
writeexcel-0.6.14 examples/diag_border.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.13/examples/diag_border.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.13/examples/diag_border.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.13/examples/diag_border.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.13/examples/diag_border.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.13/examples/diag_border.rb
writeexcel-0.6.13 examples/diag_border.rb
ricardoo27-writeexcel-0.6.12.2 examples/diag_border.rb
ricardoo27-writeexcel-0.6.12.1 examples/diag_border.rb