David Lambert
unread,May 28, 2012, 5:42:38 PM5/28/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to python-excel
bug report: Freezing rows/cols does not work with sheets beyond #2
Using the code below, I create an xls file with multiple sheets in
exactly the same way. The first two sheets have the first row and
column frozen. Sheets 3-5 do not. I expected all sheets to have the
same frozen rows and cols.
This is with xlwt 0.7.2 - I didn't see any commits that would have
fixed this.
---
import xlwt
book = xlwt.Workbook(encoding="utf-8")
for tS in [1,2,3,4,5]:
ws = book.add_sheet('sheet %d' % tS)
ws.set_panes_frozen(True) # frozen headings instead of split panes
ws.set_horz_split_pos(1) # in general, freeze after last heading
row
ws.set_vert_split_pos(1) # freeze after date col
ws.set_remove_splits(True) # if user does unfreeze, don't leave a
split there
for iR in [0,1,2]:
for iC in [0,1,2]:
ws.write(iR,iC,'a')
book.save('/tmp/t.xls')