1############################################################################## 2# 3# An example of adding document properties to a XlsxWriter file. 4# 5# Copyright 2013-2021, John McNamara, jmcnamara@cpan.org 6# 7import xlsxwriter 8 9workbook = xlsxwriter.Workbook('doc_properties.xlsx') 10worksheet = workbook.add_worksheet() 11 12workbook.set_properties({ 13 'title': 'This is an example spreadsheet', 14 'subject': 'With document properties', 15 'author': 'John McNamara', 16 'manager': 'Dr. Heinz Doofenshmirtz', 17 'company': 'of Wolves', 18 'category': 'Example spreadsheets', 19 'keywords': 'Sample, Example, Properties', 20 'comments': 'Created with Python and XlsxWriter', 21 'status': 'Quo', 22}) 23 24worksheet.set_column('A:A', 70) 25worksheet.write('A1', "Select 'Workbook Properties' to see properties.") 26 27workbook.close() 28