Sha256: b5192cf68a5ce5f7ef6b70250264caa0e4e93640eb7971936d098d1617f64b15

Contents?: true

Size: 1.04 KB

Versions: 5

Compression:

Stored size: 1.04 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 '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

5 entries across 5 versions & 1 rubygems

Version Path
writeexcel-1.0.9 examples/diag_border.rb
writeexcel-1.0.8 examples/diag_border.rb
writeexcel-1.0.7 examples/diag_border.rb
writeexcel-1.0.6 examples/diag_border.rb
writeexcel-1.0.5 examples/diag_border.rb