Sha256: b70d364a876ca920794d1649f5987599c45d842e3228536fbea1912c0a940407

Contents?: true

Size: 661 Bytes

Versions: 21

Compression:

Stored size: 661 Bytes

Contents

#!/usr/bin/env ruby

#######################################################################
#
# Example of how to change the default worksheet direction from
# left-to-right to right-to-left as required by some eastern verions
# of Excel.
#
# reverse(c), January 2006, John McNamara, jmcnamara@cpan.org
# convert to ruby by Hideo NAKAMURA, nakamura.hideo@gmail.com
#

require 'write_xlsx'

workbook   = WriteXLSX.new('right_to_left.xlsx')
worksheet1 = workbook.add_worksheet
worksheet2 = workbook.add_worksheet

worksheet2.right_to_left

worksheet1.write(0, 0, 'Hello')    #  A1, B1, C1, ...
worksheet2.write(0, 0, 'Hello')    # ..., C1, B1, A1
workbook.close

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
write_xlsx-1.12.1 examples/right_to_left.rb
write_xlsx-1.12.0 examples/right_to_left.rb
write_xlsx-1.11.2 examples/right_to_left.rb
write_xlsx-1.11.1 examples/right_to_left.rb
write_xlsx-1.11.0 examples/right_to_left.rb
write_xlsx-1.10.2 examples/right_to_left.rb
write_xlsx-1.10.1 examples/right_to_left.rb
write_xlsx-1.10.0 examples/right_to_left.rb
write_xlsx-1.09.5 examples/right_to_left.rb
write_xlsx-1.09.4 examples/right_to_left.rb
write_xlsx-1.09.3 examples/right_to_left.rb
write_xlsx-1.09.2 examples/right_to_left.rb
write_xlsx-1.09.1 examples/right_to_left.rb
write_xlsx-1.09.0 examples/right_to_left.rb
write_xlsx-1.08.2 examples/right_to_left.rb
write_xlsx-1.08.1 examples/right_to_left.rb
write_xlsx-1.08.0 examples/right_to_left.rb
write_xlsx-1.07.0 examples/right_to_left.rb
write_xlsx-1.04.0 examples/right_to_left.rb
write_xlsx-1.02.0 examples/right_to_left.rb