sst.py 939 B

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