title: Openpyxl comparing values in two sheets to see if a value does not exist
body: <p>I am making an excel comparing program that takes  a certain amount of sheets, compares them and checks to see if the values in one of the sheets do not exist in the other. However, I am receiving a repetitive problem. To clarify, here is my code:</p>
  
  <pre><code>import tkinter as tk
  from tkinter import filedialog
  import openpyxl, os, csv
  from openpyxl.utils import get_column_letter, column_index_from_string
  
  # Output File
  outputFile = open('output.csv','w',newline='')
  outputWriter = csv.writer(outputFile)
  
  # Tk initialization for file dialog
  root = tk.Tk()
  root.withdraw()
  
  # Number of sheets to be compared
  number = input('Enter number of workbook sheets for comparison: ')
  number = int(number)
  
  # Functions for generating file paths
  def generate_file_path():
      file_path = filedialog.askopenfilename(title="Open Workbook")
      return file_path
  
  # Variables to store file paths, workbooks and worksheets
  all_ws = []
  
  # Core function for program's logistics
  def core():
      # for loops for generating file paths, workbooks and worsheets
      for x in range(number):
          path = generate_file_path()
          wb = openpyxl.load_workbook(path)
          ws = wb['CBF']
          all_ws.append(ws)
  
      # for loop to use for finding diff
      for row in all_ws[1].iter_cols():
          for cellz in row:
              sheet_cols.append(cellz.value)
  
      # loop that checks if the value does not exist
      for ws_diff in range(number):
          for row,row2 in zip(all_ws[0].iter_cols(),all_ws[1].iter_cols()):
              for cell,cell2 in zip(row,row2):
                  if cell.value not in sheet_cols:
                      outputWriter.writerow([str(cell2.value)])
  </code></pre>
  
  <p>However, when I check my csv file, the "differences" outputted appear to be on both of the files. Does anyone have any suggestions for helping me out? Anything would be great thank you</p>