1############################################################################## 2# 3# A simple example using the XlsxWriter Python module and the "with" context 4# manager. This doesn't require an explicit close(). 5# 6# Copyright 2013-2021, John McNamara, jmcnamara@cpan.org 7# 8import xlsxwriter 9 10with xlsxwriter.Workbook('hello_world.xlsx') as workbook: 11 worksheet = workbook.add_worksheet() 12 13 worksheet.write('A1', 'Hello world') 14