Example #1
0
 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)
Example #2
0
 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)
Example #3
0
 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
Example #4
0
 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
Example #5
0
 def parse_formatting(self, element):
     cf = ConditionalFormatting.from_tree(element)
     self.formatting.append(cf)