Only freeze the headers row, not the headers columns

Fixes #53
This commit is contained in:
Gavin Wahl
2014-06-16 15:31:00 -06:00
parent 7acaa8460d
commit 954bbdccf3
+1 -3
View File
@@ -115,8 +115,6 @@ def dset_sheet(dataset, ws):
row_number = i + 1
for j, col in enumerate(row):
col_idx = get_column_letter(j + 1)
# We want to freeze the column after the last column
frzn_col_idx = get_column_letter(j + 2)
# bold headers
if (row_number == 1) and dataset.headers:
@@ -125,7 +123,7 @@ def dset_sheet(dataset, ws):
ws.cell('%s%s'%(col_idx, row_number)).value = unicode(col)
style = ws.get_style('%s%s' % (col_idx, row_number))
style.font.bold = True
ws.freeze_panes = '%s%s' % (frzn_col_idx, row_number)
ws.freeze_panes = 'A2'
# bold separators