title: Freeze cells in excel using xlwt
body: <p>I am creating worksheets on a fly and not naming them anything. I am unable to freeze the first column and row. I tired working with naming the sheet when adding it to the workbook and it works. However doesn't work on the fly. Below is the code</p>
  
  <pre><code>base = xlwt.Workbook()
  for k,v in MainDict.items():
      base.add_sheet(k.upper())
      col_width = 256 * 50
      xlwt.add_palette_colour("custom_colour", 0x21)
      pattern = 'url:(.*)'
      search = re.compile(pattern)
      base.set_colour_RGB(0x21, 251, 228, 228)
      style = xlwt.easyxf('pattern: pattern solid, fore_colour custom_colour;font : bold on;alignment: horiz center;font: name Times New Roman size 20;font:underline single')
      index = MainDict.keys().index(k)
      ws = base.get_sheet(index)
      ws.set_panes_frozen(True)
      try:
          for i in itertools.count():
              ws.col(i).width = col_width
      except ValueError:
          pass
      style1 = xlwt.easyxf('font: name Times New Roman size 15')
      style2 = xlwt.easyxf('font : bold on;font: name Times New Roman size 12')
      col=0
      for sk in MainDict[k].keys():
          ws.write(0,col,sk.upper(),style)
          col+=1
          row =1
          for mk in MainDict[k][sk].keys():
              for lk,lv in MainDict[k][sk][mk].items():
                  for items in lv:
                      text = ('%s URL: %s')%(items,lk)
                      links =('No data Found. Please visit the URL: %s')% (lk)
                      url = re.findall(pattern,text)
                      if len(items) != 0:
                          if re.match(pattern,text)==True:
                              ws.write(row,col-1,url,style2)
                          else:                       
                              ws.write(row,col-1,text,style1)
                              row+=1
                      else:
                          ws.write(row,col-1,links,style2)
                       #ws.Column(col-1,ws).width = 10000
                          row+=1
  default_book_style = base.default_style
  default_book_style.font.height = 20 * 36
  base.save('project7.xls')
  </code></pre>