mirror of
https://github.com/kennethreitz/tablib.git
synced 2026-06-05 23:10:17 +00:00
13 lines
434 B
Python
13 lines
434 B
Python
#!/usr/bin/env python
|
|
import xlwt
|
|
|
|
# Strings passed to (for example) Worksheet.write can be unicode objects,
|
|
# or str (8-bit) objects, which are then decoded into unicode.
|
|
# The encoding to be used defaults to 'ascii'. This can be overridden
|
|
# when the Workbook instance is created:
|
|
|
|
book = xlwt.Workbook(encoding='cp1251')
|
|
sheet = book.add_sheet('cp1251-demo')
|
|
sheet.write(0, 0, '\xce\xeb\xff')
|
|
book.save('unicode0.xls')
|