Merge pull request #154 from fusionbox/freeze-panes

Only freeze the headers row, not the headers columns
This commit is contained in:
Iuri de Silvio
2014-06-26 14:00:12 -03:00
+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