code: def paste_format(self):
          
  
          row, col, tab = self.grid.actions.cursor
  
          selection = self.get_selection()
          if selection:
              # Use selection rather than cursor for top left cell if present
              row, col = [tl if tl is not None else 0
                          for tl in selection.get_bbox()[0]]
  
          cell_attributes = self.grid.code_array.cell_attributes
  
          string_data = self.grid.main_window.clipboard.get_clipboard()
          format_data = ast.literal_eval(string_data)
  
          ca = format_data["cell_attributes"]
          rh = format_data["row_heights"]
          cw = format_data["col_widths"]
  
          assert isinstance(ca, types.ListType)
          assert isinstance(rh, types.DictType)
          assert isinstance(cw, types.DictType)
  
          # Cell attributes
  
          for selection_params, tab, attrs in ca:
              base_selection = Selection(*selection_params)
              shifted_selection = base_selection.shifted(row, col)
              if "merge_area" not in attrs:
                  # Do not paste merge areas because this may have
                  # inintended consequences for existing merge areas
                  new_cell_attribute = shifted_selection, tab, attrs
                  cell_attributes.append(new_cell_attribute)
  
          # Row heights
          row_heights = self.grid.code_array.row_heights
          for __row, __tab in rh:
              row_heights[__row+row, tab] = rh[__row, __tab]
  
          # Column widths
          col_widths = self.grid.code_array.col_widths
          for __col, __tab in cw:
              col_widths[__col+col, tab] = cw[(__col, __tab)]
docs: Pastes cell formats
  
          Pasting starts at cursor or at top left bbox corner