def time_xlwt():
 start_time = clock()
 workbook = xlwt.Workbook()
 worksheet = workbook.add_sheet('Sheet1')
 for row in range((row_max // 2)):
  for col in range(col_max):
   worksheet.write((row * 2), col, ('Row: %d Col: %d' % (row, col)))
  for col in range(col_max):
   worksheet.write(((row * 2) + 1), col, (row + col))
 workbook.save('xlwt.xls')
 elapsed = (clock() - start_time)
 print_elapsed_time('xlwt', elapsed)

def time_xlwt ( ) : start_time = clock ( ) workbook = xlwt . Workbook ( ) worksheet = workbook . add_sheet ( 'Sheet1' ) for row in range ( ( row_max // 2 ) ) : for col in range ( col_max ) : worksheet . write ( ( row * 2 ) , col , ( 'Row: %d Col: %d' % ( row , col ) ) ) for col in range ( col_max ) : worksheet . write ( ( ( row * 2 ) + 1 ) , col , ( row + col ) ) workbook . save ( 'xlwt.xls' ) elapsed = ( clock ( ) - start_time ) print_elapsed_time ( 'xlwt' , elapsed )
run xlwt in default mode .