User Tools

Site Tools


python:exelprocess

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
python:exelprocess [2021/04/10 05:25] – [Error Parse UTF-8 file] adminpython:exelprocess [2022/03/19 13:31] – [Error Parse UTF-8 file] admin
Line 124: Line 124:
 ==== Error Parse UTF-8 file ==== ==== Error Parse UTF-8 file ====
 <code> <code>
-UnicodeDecodeError: 'utf16' codec can't decode bytes in position+UnicodeDecodeError: 'utf16' codec can't decode bytes in position 3438-3439: unexpected end of data
 </code> => Check exel format in encoding(not utf-8)(May be exel file was not stored as encoding utf-8, It can be saved as utf16 default encoding)  </code> => Check exel format in encoding(not utf-8)(May be exel file was not stored as encoding utf-8, It can be saved as utf16 default encoding) 
 You can debug for information:<code python> You can debug for information:<code python>
Line 132: Line 132:
 CODEPAGE: codepage 1200 -> encoding 'utf_16_le' CODEPAGE: codepage 1200 -> encoding 'utf_16_le'
 DATEMODE: datemode 0 DATEMODE: datemode 0
-</code> => encoding: **'utf_16_le'**+</code> => default encoding: **'utf_16_le'** 
 + 
 +**Fix**: Lỗi do file exel, mở lại file exel và lưu lại sẽ hết lỗi
 ===== Using xlwt ===== ===== Using xlwt =====
python/exelprocess.txt · Last modified: 2022/10/29 16:15 by 127.0.0.1