1#!/usr/bin/env python 2# -*- coding: windows-1251 -*- 3# Copyright (C) 2005 Kiseliov Roman 4 5from xlwt import * 6 7font0 = Formatting.Font() 8font0.name = 'Arial' 9font1 = Formatting.Font() 10font1.name = 'Arial Cyr' 11font2 = Formatting.Font() 12font2.name = 'Times New Roman' 13font3 = Formatting.Font() 14font3.name = 'Courier New Cyr' 15 16num_format0 = '0.00000' 17num_format1 = '0.000000' 18num_format2 = '0.0000000' 19num_format3 = '0.00000000' 20 21st0 = XFStyle() 22st1 = XFStyle() 23st2 = XFStyle() 24st3 = XFStyle() 25st4 = XFStyle() 26 27st0.font = font0 28st0.num_format = num_format0 29 30st1.font = font1 31st1.num_format = num_format1 32 33st2.font = font2 34st2.num_format = num_format2 35 36st3.font = font3 37st3.num_format = num_format3 38 39wb = Workbook() 40 41wb.add_style(st0) 42wb.add_style(st1) 43wb.add_style(st2) 44wb.add_style(st3) 45 46ws0 = wb.add_sheet('0') 47ws0.write(0, 0, 'Olya'*0x4000, st0) 48 49#for i in range(0, 0x10): 50# ws0.write(i, 2, ('%d'%i)*0x4000, st1) 51 52wb.save('sst.xls') 53