Sha256: 57b7454d913655e8f906b954c1f3e62582ea76a4978738c8ec484080ea49e2e2

Contents?: true

Size: 679 Bytes

Versions: 25

Compression:

Stored size: 679 Bytes

Contents

#!/usr/bin/env ruby

#######################################################################
#
# Example of how to set Excel worksheet tab colours.
#
# reverse(c), May 2006, John McNamara, jmcnamara@cpan.org
# convert to ruby by Hideo NAKAMURA, cxn03651@msj.biglobe.ne.jp
#

require 'rubygems'
require 'write_xlsx'

workbook = Excel::Writer::XLSX.new('tab_colors.xlsx')

worksheet1 = workbook.add_worksheet
worksheet2 = workbook.add_worksheet
worksheet3 = workbook.add_worksheet
worksheet4 = workbook.add_worksheet

# Worksheet1 will have the default tab colour.
worksheet2.tab_color = 'red'
worksheet3.tab_color = 'green'
worksheet4.tab_color = 0x35    # Orange

workbook.close

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
write_xlsx-0.81.0 examples/tab_colors.rb
write_xlsx-0.80.0 examples/tab_colors.rb
write_xlsx-0.79.0 examples/tab_colors.rb
write_xlsx-0.78.0 examples/tab_colors.rb
write_xlsx-0.77.2 examples/tab_colors.rb
write_xlsx-0.77.1 examples/tab_colors.rb
write_xlsx-0.77.0 examples/tab_colors.rb
write_xlsx-0.76.3 examples/tab_colors.rb
write_xlsx-0.76.2 examples/tab_colors.rb
write_xlsx-0.76.1 examples/tab_colors.rb
write_xlsx-0.76.0 examples/tab_colors.rb
write_xlsx-0.75.0 examples/tab_colors.rb
write_xlsx-0.74.0 examples/tab_colors.rb
write_xlsx-0.73.0 examples/tab_colors.rb
write_xlsx-0.72.3.beta1 examples/tab_colors.rb
write_xlsx-0.72.2 examples/tab_colors.rb
write_xlsx-0.72.1 examples/tab_colors.rb
write_xlsx-0.72.0 examples/tab_colors.rb
write_xlsx-0.71.0 examples/tab_colors.rb
write_xlsx-0.70.0 examples/tab_colors.rb