def do_xf(self, elem): if self.xf_type != 1: #### ignoring style XFs for the moment return xfx = self.xf_counts[self.xf_type] self.xf_counts[self.xf_type] = xfx + 1 xf = XF() self.bk.xf_list.append(xf) self.bk.xfcount += 1 numFmtId = int(elem.get("numFmtId", "0")) xf.format_key = numFmtId is_date = self.fmt_is_date.get(numFmtId, 0) self.bk._xf_index_to_xl_type_map[xfx] = is_date + 2 if self.verbosity >= 3: self.dumpout("xfx=%d numFmtId=%d", xfx, numFmtId) self.dumpout(repr(self.bk._xf_index_to_xl_type_map))
def __init__(self, formatting_info=0, ragged_rows=False, ): Book.__init__(self) self.ragged_rows = ragged_rows self.formatting_info=formatting_info self.initialise_format_info() if formatting_info: f = Font() self.font_list.append(f) self.format_map[0]= Format(0,FUN,u'General') xf = XF() xf.alignment = XFAlignment() xf.border = XFBorder() xf.background = XFBackground() xf.protection = XFProtection() self.xf_list.append(xf)
def do_xf(self, elem): if self.xf_type != 1: #### ignoring style XFs for the moment return xfx = self.xf_counts[self.xf_type] self.xf_counts[self.xf_type] = xfx + 1 xf = XF() self.bk.xf_list.append(xf) self.bk.xfcount += 1 numFmtId = int(elem.get('numFmtId', '0')) xf.format_key = numFmtId is_date = self.fmt_is_date.get(numFmtId, 0) self.bk._xf_index_to_xl_type_map[xfx] = is_date + 2 if self.verbosity >= 3: self.dumpout( 'xfx=%d numFmtId=%d', xfx, numFmtId, ) self.dumpout(repr(self.bk._xf_index_to_xl_type_map))