Reputation: 303
I'm trying to create '.xlxs' file via xlsxwriter but it doesn't create. After entering the command, nothing happens.
import xlsxwriter
workbook = xlsxwriter.Workbook('file.xlsx')
Upvotes: 0
Views: 1153
Reputation: 457
For completeness' sake, a short, but complete demo is shown in the docs: http://xlsxwriter.readthedocs.org/example_demo.html#ex-demo
As Jkdc mentioned, you need to add a worksheet and close it in addition to "creating" it.
Upvotes: 2
Reputation: 5289
You need to add a worksheet:
worksheet = workbook.add_worksheet()
and then close the workbook:
workbook.close()
Upvotes: 4