def parse_formatting(self, element): try: cf = ConditionalFormatting.from_tree(element) self.formatting.append(cf) except TypeError: msg = f"Failed to load a conditional formatting rule. It will be discarded. Cause: {traceback.format_exc()}" warn(msg)
def parse_formatting(self, element): try: cf = ConditionalFormatting.from_tree(element) self.formatting.append(cf) except TypeError as e: msg = "Failed to load a conditional formatting rule. It will be discarded. Cause: {}".format( e) warn(msg)
def parser_conditional_formatting(self, element): cf = ConditionalFormatting.from_tree(element) for rule in cf.rules: if rule.dxfId is not None: rule.dxf = self.differential_styles[rule.dxfId] self.ws.conditional_formatting[cf] = rule
def parse_formatting(self, element): cf = ConditionalFormatting.from_tree(element) self.formatting.append(cf)