xlwt set style making error: More than 4094 XFs (styles)

前端 未结 3 731
梦毁少年i
梦毁少年i 2021-01-02 02:58

I use Xlwt for writing an excel file. it\'s cells has some style (color, alignment ,borders , ... )

when i use XFStyle and set borders and other attr of style, in s

3条回答
  •  余生分开走
    2021-01-02 03:50

    Upon encountering the same problem in the LOOP I have extracted the description of format from the loop and it continued smoothly:

    this did not work:

    for ... :
        ws. row(row_index).write(col_index, value, easyxf('pattern: pattern solid, fore_colour yellow; align: wrap 1'))
    

    but this does:

    ostyle = easyxf('pattern: pattern solid, fore_colour yellow; align: wrap 1')
    
    for .... :
        ws.row(row_index).write(col_index, value,ostyle)
    

提交回复
热议问题