Sha256: 83753fd45e025b1aff21323ec9ec35d26ff00fec1752d8567ac43712404fd901
Contents?: true
Size: 1.64 KB
Versions: 6
Compression:
Stored size: 1.64 KB
Contents
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'] = 12345 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
6 entries across 6 versions & 1 rubygems