unicode1.py 1.0 KB

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env python
  2. # -*- coding: windows-1251 -*-
  3. # Copyright (C) 2005 Kiseliov Roman
  4. from xlwt import *
  5. w = Workbook()
  6. ws1 = w.add_sheet(u'\N{GREEK SMALL LETTER ALPHA}\N{GREEK SMALL LETTER BETA}\N{GREEK SMALL LETTER GAMMA}')
  7. ws1.write(0, 0, u'\N{GREEK SMALL LETTER ALPHA}\N{GREEK SMALL LETTER BETA}\N{GREEK SMALL LETTER GAMMA}')
  8. ws1.write(1, 1, u'\N{GREEK SMALL LETTER DELTA}x = 1 + \N{GREEK SMALL LETTER DELTA}')
  9. ws1.write(2,0, u'A\u2262\u0391.') # RFC2152 example
  10. ws1.write(3,0, u'Hi Mom -\u263a-!') # RFC2152 example
  11. ws1.write(4,0, u'\u65E5\u672C\u8A9E') # RFC2152 example
  12. ws1.write(5,0, u'Item 3 is \u00a31.') # RFC2152 example
  13. ws1.write(8,0, u'\N{INTEGRAL}') # RFC2152 example
  14. w.add_sheet(u'A\u2262\u0391.') # RFC2152 example
  15. w.add_sheet(u'Hi Mom -\u263a-!') # RFC2152 example
  16. one_more_ws = w.add_sheet(u'\u65E5\u672C\u8A9E') # RFC2152 example
  17. w.add_sheet(u'Item 3 is \u00a31.') # RFC2152 example
  18. one_more_ws.write(0, 0, u'\u2665\u2665')
  19. w.add_sheet(u'\N{GREEK SMALL LETTER ETA WITH TONOS}')
  20. w.save('unicode1.xls')