How to add a new work sheet to work book in xlsxwriter
<p>I want to add some sheets to one workbook.</p>

<pre><code>sheets = ["A.csv", "B.csv", "C.csv"]
for sh in sheets:
    workbook = xlsxwriter.Workbook('myxlsx.xlsx')
    worksheet = workbook.add_worksheet(sh)
    worksheet.write(1,1,"abcd")
    workbook.close()
</code></pre>

<p>But what it does is it only creates a sheet corresponding to "C.csv" and not to "A.csv" and "B.csv"
From what I have got, it is because every time it loops it creates a new workbook. I want to create the 3 sheets on same workbook.</p>

<p>Also, there is one condition, I want to initialise the workbook constructor inside the loop only.</p>