code: def copy_format(self):
          
  
          row, col, tab = self.grid.actions.cursor
          code_array = self.grid.code_array
  
          # Cell attributes
  
          new_cell_attributes = []
          selection = self.get_selection()
          if not selection:
              # Current cell is chosen for selection
              selection = Selection([], [], [], [], [(row, col)])
  
          # Format content is shifted so that the top left corner is 0,0
          ((top, left), (bottom, right)) = \
              selection.get_grid_bbox(self.grid.code_array.shape)
  
          cell_attributes = code_array.cell_attributes
          for __selection, table, attrs in cell_attributes:
              if tab == table:
                  new_selection = selection & __selection
                  if new_selection:
                      new_shifted_selection = new_selection.shifted(-top, -left)
                      if "merge_area" not in attrs:
                          selection_params = new_shifted_selection.parameters
                          cellattribute = selection_params, table, attrs
                          new_cell_attributes.append(cellattribute)
  
          # Rows
  
          shifted_new_row_heights = {}
          for row, table in code_array.row_heights:
              if tab == table and top <= row <= bottom:
                  shifted_new_row_heights[row-top, table] = \
                      code_array.row_heights[row, table]
  
          # Columns
  
          shifted_new_col_widths = {}
          for col, table in code_array.col_widths:
              if tab == table and left <= col <= right:
                  shifted_new_col_widths[col-left, table] = \
                      code_array.col_widths[col, table]
  
          format_data = {
              "cell_attributes": new_cell_attributes,
              "row_heights": shifted_new_row_heights,
              "col_widths": shifted_new_col_widths,
          }
  
          attr_string = repr(format_data)
  
          self.grid.main_window.clipboard.set_clipboard(attr_string)
docs: Copies the format of the selected cells to the Clipboard
  
          Cells are shifted so that the top left bbox corner is at 0,0