On 2012/03/05 02:37 PM, Marko Limbek wrote:
Hi everyone.
I am new to list and few months old to Python. I am writing some text
to Excel and I open the new book and try to write to the book and the
save it using
book.save
Now when I write slavic characters in the text to Excel (č, š, ž, for
instance 0xc5), I get an error, I can't save it.
I have declared appropriate encoding
# -*- coding: utf-8 -*-
# coding=<utf-8>
#!/E:/Python
and those characters appear normally in the code, but there seems to
be the problem with the function book.save.
Does anyone have any ideas, what would be the problem and how to solve
it? Some additional encoding or some changes or parameters to the
book.save method?
Is that the right forum for my question?
Thank you,
Marko
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
What package are you using to create your Excel workbook ?
If it's xlwt you can set your encoding type when you create your workbook
book = xlwt.Workbook(encoding="utf-8")
--
Christian Witts
Python Developer
//
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor