Sha256: dd4ba0c97babe550a31338abd634cad755dfdf23bc927e67e5d95f5ba0fbf29b

Contents?: true

Size: 798 Bytes

Versions: 38

Compression:

Stored size: 798 Bytes

Contents

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

##############################################################################
#
# A simple formatting example using Spreadsheet::WriteExcel.
#
# This program demonstrates the indentation 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('indent.xls')

worksheet = workbook.add_worksheet()
indent1   = workbook.add_format(:indent => 1)
indent2   = workbook.add_format(:indent => 2)

worksheet.set_column('A:A', 40)


worksheet.write('A1', "This text is indented 1 level",  indent1)
worksheet.write('A2', "This text is indented 2 levels", indent2)

workbook.close

Version data entries

38 entries across 38 versions & 3 rubygems

Version Path
writeexcel-1.0.9 examples/indent.rb
writeexcel-1.0.8 examples/indent.rb
writeexcel-1.0.7 examples/indent.rb
writeexcel-1.0.6 examples/indent.rb
writeexcel-1.0.5 examples/indent.rb
writeexcel-1.0.4 examples/indent.rb
writeexcel-1.0.3 examples/indent.rb
writeexcel-1.0.2 examples/indent.rb
writeexcel-1.0.1 examples/indent.rb
writeexcel-1.0.0 examples/indent.rb
writeexcel-0.6.19 examples/indent.rb
writeexcel-0.6.18 examples/indent.rb
writeexcel-0.6.17 examples/indent.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.16/examples/indent.rb
writeexcel-0.6.16 examples/indent.rb
writeexcel-0.6.15 examples/indent.rb
writeexcel-0.6.14 examples/indent.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.13/examples/indent.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.13/examples/indent.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.13/examples/indent.rb