Sha256: db2b6406390e270c16ece08917194bea48f25a8bf2ad939fb2bef19947d6935e

Contents?: true

Size: 771 Bytes

Versions: 6

Compression:

Stored size: 771 Bytes

Contents

#!/usr/bin/ruby -w

#######################################################################
#
# Example of how to hide a worksheet with WriteExcel.
#
# reverse('©'), April 2005, John McNamara, jmcnamara@cpan.org
#
# original written in Perl by John McNamara
# converted to Ruby by Hideo Nakamura, cxn03651@msj.biglobe.ne.jp
#
require 'rubygems'
require 'writeexcel'


workbook   = WriteExcel.new('hidden.xls')
worksheet1 = workbook.add_worksheet
worksheet2 = workbook.add_worksheet
worksheet3 = workbook.add_worksheet

# Sheet2 won't be visible until it is unhidden in Excel.
worksheet2.hide

worksheet1.write(0, 0, 'Sheet2 is hidden')
worksheet2.write(0, 0, 'How did you find me?')
worksheet3.write(0, 0, 'Sheet2 is hidden')

workbook.close

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
writeexcel-0.3.5 examples/hide_sheet.rb
writeexcel-0.3.4 examples/hidden.rb
writeexcel-0.3.3 examples/hidden.rb
writeexcel-0.3.2 examples/hidden.rb
writeexcel-0.3.1 examples/hidden.rb
writeexcel-0.3.0 examples/hidden.rb