I'm trying to write data to an excel file that includes Japanese characters. I'm using codec.open() to get the data, and that seems to work fine, but I run into this error when I try to write the data:
UnicodeEncodeError: 'ascii' codec can't encode characters in position 16-17: ordinal not in range(128)
I don't understand why the program would be insisting on using ascii here. When I created a new workbook object, I did so using
wb = xlwt.Workbook(encoding='utf-8')
and both the program file itself and the file it's reading in are saved as UTF-8.
Anybody have any ideas?
EDIT: Here's a link to the xlwt package. http://pypi.python.org/pypi/xlwt