title: XlsxWriter: Creating new worksheets
body: <p>I'm trying to create new worksheets using the XlsxWriter to write data to a new sheet with every new iteration of a loop.</p>
  
  <p>The code that I have is as follows:</p>
  
  <pre><code>workbook = xlsxwriter.Workbook('Report.xlsx')
  for i in range(0, len(list)):
      worksheet = workbook.add_worksheet()
      #Extract data from the list and add it to the excel sheet
      workbook.close()
  </code></pre>
  
  <p>Now, the problem with this method is that I see only a  single worksheet, and not multiple sheets.</p>
  
  <p>Where am I going wrong?</p>