Sha256: 032cb86f6e80f82fd244f8178b47a976ea9158b84eff893c38b5686c187b1234

Contents?: true

Size: 976 Bytes

Versions: 5

Compression:

Stored size: 976 Bytes

Contents

#!/usr/bin/ruby
# -*- 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

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

5 entries across 5 versions & 1 rubygems

Version Path
writeexcel-1.0.4 examples/properties.rb
writeexcel-1.0.3 examples/properties.rb
writeexcel-1.0.2 examples/properties.rb
writeexcel-1.0.1 examples/properties.rb
writeexcel-1.0.0 examples/properties.rb