blanks.py 625 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/usr/bin/env python
  2. # -*- coding: windows-1251 -*-
  3. # Copyright (C) 2005 Kiseliov Roman
  4. from xlwt import *
  5. font0 = Font()
  6. font0.name = 'Times New Roman'
  7. font0.struck_out = True
  8. font0.bold = True
  9. style0 = XFStyle()
  10. style0.font = font0
  11. wb = Workbook()
  12. ws0 = wb.add_sheet('0')
  13. ws0.write(1, 1, 'Test', style0)
  14. for i in range(0, 0x53):
  15. borders = Borders()
  16. borders.left = i
  17. borders.right = i
  18. borders.top = i
  19. borders.bottom = i
  20. style = XFStyle()
  21. style.borders = borders
  22. ws0.write(i, 2, '', style)
  23. ws0.write(i, 3, hex(i), style0)
  24. ws0.write_merge(5, 8, 6, 10, "")
  25. wb.save('blanks.xls')