I have a problem when I pull and print the Russian-language strings
Use Python 2.7 and Lib Openpyxl
Code use is :
workbook = load_workbook(filename ='sample.xlsx')
first_sheet = workbook.get_sheet_names()[0]
worksheet = workbook.get_sheet_by_name(first_sheet)
ws = workbook.active
riga = 0;
id_cell = 0;
lenght_word = 0;
for row in worksheet.iter_rows():
riga+=1
id_cell=0;
if riga > 4:
for cell in row:
id_cell+=1
if id_cell == 3:
lenght_word = cell.value
print lenght_word
if id_cell > 3:
try:
#print cell
str_lenght = len(cell.value)
print cell.value, str_lenght
Error generate when print return codecs.charmap_encode(input,errors,encoding_map)
thanks