How do I add list in xlsxwriter?
<p>I'm having hard time outputting my format in spreadsheet using xlsxwriter.
I have four keys.</p>

<pre><code>worksheet.write('A1', 'Provider Name', bold)
worksheet.write('A2', 'Description', bold)
worksheet.write('A3', 'Number of Store', bold)
worksheet.write('A4', 'City', bold)
</code></pre>

<p>I want to be able to write multiple provider names that's in my for loop to next column. Something like this.</p>

<p>I'm scraping these values; and here is how I'm doing it.</p>

<pre><code>for td in mainWrapper:
        provider_name = td.findAll('td')[0].find('h4').text.strip()
        description = td.findAll('td')[0].find('p', attrs={'class':'desc'}).text.strip()
        number_of_store = td.findAll('td')[2].text
        city = td.findAll('td')[-1].text
</code></pre>

<p>How do I set each of these items to my xlsxwriter. I want my output to look something like this. So I want to be able to add multiple provider names, description, number_of_store and city in each new column.</p>

<p><a href="https://i.stack.imgur.com/Hu7Oh.png" rel="nofollow"><img src="https://i.stack.imgur.com/Hu7Oh.png" alt="Example output format"></a></p>

<p>You can use <a href="https://xlsxwriter.readthedocs.io/worksheet.html#worksheet-write-row" rel="nofollow"><code>write_row()</code></a> (or <a href="https://xlsxwriter.readthedocs.io/worksheet.html#worksheet-write-column" rel="nofollow"><code>write_column()</code></a>) to write lists in one go: </p>

<pre><code># Some sample data.
data = ('Foo', 'Bar', 'Baz')

# Write the data to a sequence of cells.
worksheet.write_row('A1', data)

# The above example is equivalent to:
worksheet.write('A1', data[0])
worksheet.write('B1', data[1])
worksheet.write('C1', data[2])
</code></pre>

python xlsxwriter