Sha256: 28ea514dc711ef5cf7324e9c96f39755d75ffb2062a71a294882f8d76156151c

Contents?: true

Size: 758 Bytes

Versions: 38

Compression:

Stored size: 758 Bytes

Contents

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

##############################################################################
#
# A simple formatting example using Excel::Writer::XLSX.
#
# This program demonstrates the indentation cell format.
#
# reverse(c), May 2004, John McNamara, jmcnamara@cpan.org
# convert to ruby by Hideo NAKAMURA, cxn03651@msj.biglobe.ne.jp
#

require 'rubygems'
require 'write_xlsx'

workbook = WriteXLSX.new('indent.xlsx')

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 & 1 rubygems

Version Path
write_xlsx-0.69.0 examples/indent.rb
write_xlsx-0.65.1 examples/indent.rb
write_xlsx-0.65.0 examples/indent.rb
write_xlsx-0.64.1 examples/indent.rb
write_xlsx-0.64.0 examples/indent.rb
write_xlsx-0.62.0 examples/indent.rb
write_xlsx-0.61.0 examples/indent.rb
write_xlsx-0.60.0 examples/indent.rb
write_xlsx-0.59.0 examples/indent.rb
write_xlsx-0.58.0 examples/indent.rb
write_xlsx-0.57.0 examples/indent.rb
write_xlsx-0.56.0 examples/indent.rb
write_xlsx-0.55.0 examples/indent.rb
write_xlsx-0.54.0 examples/indent.rb
write_xlsx-0.51.0 examples/indent.rb
write_xlsx-0.0.4 examples/indent.rb
write_xlsx-0.0.3 examples/indent.rb
write_xlsx-0.0.2 examples/indent.rb