diff options
| author | Aaron Levin <alevin@kobo.com> | 2012-08-01 11:45:12 -0400 |
|---|---|---|
| committer | Aaron Levin <alevin@kobo.com> | 2012-08-01 11:45:12 -0400 |
| commit | c88c7943147cc317b9a0c7191df8a73090bf35a5 (patch) | |
| tree | 9a2aa41d92a4a985e0ea0405c86156b1b3939d0e /tablib | |
| parent | 752443f07706c666d52ef72ca27e1ae931358f49 (diff) | |
| download | tablib-c88c7943147cc317b9a0c7191df8a73090bf35a5.tar.gz | |
Fixed Frozen Frame issue in xlsx export
Diffstat (limited to 'tablib')
| -rw-r--r-- | tablib/formats/_xlsx.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tablib/formats/_xlsx.py b/tablib/formats/_xlsx.py index 957fc64..f80f1a7 100644 --- a/tablib/formats/_xlsx.py +++ b/tablib/formats/_xlsx.py @@ -66,6 +66,8 @@ 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: @@ -74,7 +76,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' % (col_idx, row_number) + ws.freeze_panes = '%s%s' % (frzn_col_idx, row_number) # bold separators |
