Sha256: e7bd535d3de0b7533853005afa8c0ee4e98c53651a600c73e28a122e038bb2eb
Contents?: true
Size: 1.67 KB
Versions: 1
Compression:
Stored size: 1.67 KB
Contents
# frozen_string_literal: true require_relative './xlsx_func_testcase' class TestProperties < XlsxWriterTestCase test 'properties01' do |wb| wb.properties do |p| p.title = 'This is an example spreadsheet' p.subject = 'With document properties' p.author = 'Someone' p.manager = 'Dr. Heinz Doofenshmirtz' p.company = 'of Wolves' p.category = 'Example spreadsheets' p.keywords = 'Sample, Example, Properties' p.comments = 'Created with Perl and Excel::Writer::XLSX' p.status = 'Quo' end wb.add_worksheet do |ws| ws.set_column(0, 0, width: 70) ws.write_string(0, 0, 'Select \'Office Button -> Prepare -> Properties\' to see the file properties.', nil) end end test 'properties02' do |wb| wb.properties.hyperlink_base = 'C:\\' wb.add_worksheet end test 'properties04' do |wb| wb.properties['Checked by'] = 'Adam' wb.properties['Date completed'] = Time.new(2016, 12, 12, 23) wb.properties['Document number'] = 12_345 wb.properties['Reference'] = 1.2345 wb.properties['Source'] = true wb.properties['Status'] = false wb.properties['Department'] = 'Finance' wb.properties['Group'] = 1.2345678901234 wb.add_worksheet do |ws| ws.set_column 0, 0, width: 70 ws.write_string 0, 'A', 'Select \'Office Button -> Prepare -> Properties\' to see the file properties.', nil end end test 'properties05' do |wb| wb.properties['Location'] = "Caf\xc3\xa9" wb.add_worksheet do |ws| ws.set_column 0, 0, width: 70 ws.write_string 0, 'A', 'Select \'Office Button -> Prepare -> Properties\' to see the file properties.', nil end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
xlsxwriter-0.2.2 | test/test_properties.rb |