Openpyxl.utils.exceptions.IllegalcharacterError

后端 未结 3 2255
遥遥无期
遥遥无期 2021-01-05 15:19

I have the following python code to write processed words into excel file. The words are about 7729

From openpyxl import *
book=Workbook ()
sheet=book.active
         


        
3条回答
  •  生来不讨喜
    2021-01-05 15:44

    I faced similar issue and found out that it is because of \xa1 character which is hex value of ascii 26 (SUB). Openpyxl is not allowing to write such characters (ascii code < 32). I tried xlsxwriter library without any issue it worte this character in xlsx file.

提交回复
热议问题