Insert data row-wise instead of column-wise and 1 blank row after each record
<p>Here is my code:</p>

<pre><code>wb = Workbook()

dest_filename = 'book.xlsx'
th_list = ["this", "that", "what", "is", "this"]

ws1 = wb.active
ws1.title = 'what'

for row in range(1, 2):
    for col in range(1, len(th_list)):
        _ = ws1.cell(column=col, row=row, value="{0}".format(th_list[col].encode('utf-8')))

wb.save(filename = dest_filename)
</code></pre>

<p>After running the py file I get the data this way:</p>

<pre><code>      A     B     C     D     E
1     this  that  what  is    this
</code></pre>

<p>While I want the data this way:</p>

<pre><code>      A
1     this
2     that
3     what
4     is
5     this
</code></pre>

<p>and also insert 1 empty row between each row like this:</p>

<pre><code>      A
1     this
2
3     that
4
5     what
6
7     is
8
9     this
</code></pre>

<p>I am trying to change my code to fulfill the requirement. I will also post my code as answer if I find the solution.</p>

<p><strong>EDIT:</strong> Okay I have successfully converted data from row-wise into column-wise with modifying for loops. But still unable to add empty rows after each record. Here is the code:</p>

<pre><code>wb = Workbook()

dest_filename = 'book.xlsx'
th_list = ["this", "that", "what", "is", "this"]

ws1 = wb.active
ws1.title = 'what'

for col in range(1, 2):
    for row in range(1, len(th_list)+1):
        _ = ws1.cell(column=col, row=row, value="{0}".format(th_list[row-1].encode('utf-8')))

wb.save(filename = dest_filename)
</code></pre>

<p>Why are you writing something so incredibly complicated?</p>

<pre><code>for v in th_list:
   ws.append([v]) # pad as necessary, never encode
   ws.append() # blank row
</code></pre>

python python-2.7 openpyxl