Sha256: 983da4eae562e16768614a680974e38fc0ae6237758ca3e7bd8864a6e9c5d270

Contents?: true

Size: 984 Bytes

Versions: 28

Compression:

Stored size: 984 Bytes

Contents

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

##############################################################################
#
# An example of adding document properties to a WriteExcel file.
#
# reverse('©'), August 2008, 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('properties.xls')
worksheet = workbook.add_worksheet
bp =1
workbook.set_properties(
    :title    => 'This is an example spreadsheet',
    :subject  => 'With document properties',
    :author   => 'Hideo NAKAMURA',
    :manager  => 'John McNamara',
    :company  => 'Rubygem',
    :category => 'Example spreadsheets',
    :keywords => 'Sample, Example, Properties',
    :comments => 'Created with Ruby and WriteExcel'
)


worksheet.set_column('A:A', 50)
worksheet.write('A1', 'Select File->Properties to see the file properties')

workbook.close

Version data entries

28 entries across 28 versions & 3 rubygems

Version Path
writeexcel-0.6.19 examples/properties.rb
writeexcel-0.6.18 examples/properties.rb
writeexcel-0.6.17 examples/properties.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.16/examples/properties.rb
writeexcel-0.6.16 examples/properties.rb
writeexcel-0.6.15 examples/properties.rb
writeexcel-0.6.14 examples/properties.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.13/examples/properties.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.13/examples/properties.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.13/examples/properties.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.13/examples/properties.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.13/examples/properties.rb
writeexcel-0.6.13 examples/properties.rb
ricardoo27-writeexcel-0.6.12.2 examples/properties.rb
ricardoo27-writeexcel-0.6.12.1 examples/properties.rb
writeexcel-0.6.12 examples/properties.rb
writeexcel-0.6.11 examples/properties.rb
writeexcel-0.6.10 examples/properties.rb
writeexcel-0.6.9 examples/properties.rb
writeexcel-0.6.8 examples/properties.rb