Sha256: b0fe7d0ae6adede287958d01f37a5cfd8f0593b4d63bb6d571e4dd1a8c766b20

Contents?: true

Size: 989 Bytes

Versions: 12

Compression:

Stored size: 989 Bytes

Contents

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

##############################################################################
#
# An example of adding document properties to a Excel::Writer::XLSX file.
#
# reverse('©'), August 2008, John McNamara, jmcnamara@cpan.org
# convert to ruby by Hideo NAKAMURA, nakamura.hideo@gmail.com
#

require 'write_xlsx'

workbook  = WriteXLSX.new('properties.xlsx')
worksheet = workbook.add_worksheet

workbook.set_properties(
    :title    => 'This is an example spreadsheet',
    :subject  => 'With document properties',
    :author   => 'John McNamara',
    :manager  => 'Dr. Heinz Doofenshmirtz',
    :company  => 'of Wolves',
    :category => 'Example spreadsheets',
    :keywords => 'Sample, Example, Properties',
    :comments => 'Created with Perl and Excel::Writer::XLSX',
    :status   => 'Quo'
)

worksheet.set_column('A:A', 70)
worksheet.write('A1', "Select 'Office Button -> Prepare -> Properties' to see the file properties.")

workbook.close

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
write_xlsx-1.09.4 examples/properties.rb
write_xlsx-1.09.3 examples/properties.rb
write_xlsx-1.09.2 examples/properties.rb
write_xlsx-1.09.1 examples/properties.rb
write_xlsx-1.09.0 examples/properties.rb
write_xlsx-1.08.2 examples/properties.rb
write_xlsx-1.08.1 examples/properties.rb
write_xlsx-1.08.0 examples/properties.rb
write_xlsx-1.07.0 examples/properties.rb
write_xlsx-1.04.0 examples/properties.rb
write_xlsx-1.02.0 examples/properties.rb
write_xlsx-1.01.0 examples/properties.rb