@classmethod<EOL><INDENT>def _style_to_xlwt(cls, item, firstlevel=True, field_sep='<STR_LIT:U+002C>',<EOL>line_sep='<STR_LIT:;>'):<DEDENT>
if hasattr(item, '<STR_LIT>'):<EOL><INDENT>if firstlevel:<EOL><INDENT>it = ["<STR_LIT>"<EOL>.format(key=key, val=cls._style_to_xlwt(value, False))<EOL>for key, value in item.items()]<EOL>out = "<STR_LIT>".format(sep=(line_sep).join(it))<EOL>return out<EOL><DEDENT>else:<EOL><INDENT>it = ["<STR_LIT>"<EOL>.format(key=key, val=cls._style_to_xlwt(value, False))<EOL>for key, value in item.items()]<EOL>out = "<STR_LIT>".format(sep=(field_sep).join(it))<EOL>return out<EOL><DEDENT><DEDENT>else:<EOL><INDENT>item = "<STR_LIT>".format(item=item)<EOL>item = item.replace("<STR_LIT:True>", "<STR_LIT>")<EOL>item = item.replace("<STR_LIT:False>", "<STR_LIT>")<EOL>return item<EOL><DEDENT>
helper which recursively generate an xlwt easy style string
        for example:

            hstyle = {"font": {"bold": True},
            "border": {"top": "thin",
                    "right": "thin",
                    "bottom": "thin",
                    "left": "thin"},
            "align": {"horiz": "center"}}
            will be converted to
            font: bold on; \
                    border: top thin, right thin, bottom thin, left thin; \
                    align: horiz center;