Sha256: d59d0e9d385887e12c6ea5131b7517fc575a55a2b57938901fa3cf9d7939b71c

Contents?: true

Size: 739 Bytes

Versions: 21

Compression:

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

21 entries across 21 versions & 1 rubygems

Version Path
write_xlsx-1.00.0 examples/indent.rb
write_xlsx-0.99.0 examples/indent.rb
write_xlsx-0.97.0 examples/indent.rb
write_xlsx-0.90.0 examples/indent.rb
write_xlsx-0.89.0 examples/indent.rb
write_xlsx-0.88.0 examples/indent.rb
write_xlsx-0.87.0 examples/indent.rb
write_xlsx-0.86.0 examples/indent.rb
write_xlsx-0.85.11 examples/indent.rb
write_xlsx-0.85.10 examples/indent.rb
write_xlsx-0.85.9 examples/indent.rb
write_xlsx-0.85.8 examples/indent.rb
write_xlsx-0.85.7 examples/indent.rb
write_xlsx-0.85.6 examples/indent.rb
write_xlsx-0.85.5 examples/indent.rb
write_xlsx-0.85.4 examples/indent.rb
write_xlsx-0.85.3 examples/indent.rb
write_xlsx-0.85.2 examples/indent.rb
write_xlsx-0.85.1 examples/indent.rb
write_xlsx-0.83.0 examples/indent.rb