Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 5
0
 def parse_formatting(self, element):
     cf = ConditionalFormatting.from_tree(element)
     self.formatting.append(cf)