title: Sorting Excel by 4 columns using Python (using win32com?)
body: <p>I've been trying to sort my spreadsheet by 4 columns. Using win32com, I have managed to sort by 3 columns using the below code:</p>
  
  <pre><code>excel = win32com.client.Dispatch("Excel.Application")
  
  wb= excel.Workbooks.Open('.xlsx')
  ws= wb.worksheets[0]
  
  ws.Range(D6:D110).Sort(Key1=ws.Range('D1'), Order1=1, Key2=ws.Range('E1'), Order2=2, Key3=ws.Range('G1'), Order3=3, Orientation=1)
  </code></pre>
  
  <p>However, when I try to add Key4, it says Key4 is an unexpected keyword argument. Is the Range.Sort function limited to only 3 keys? Is there a way to add a 4th? </p>
  
  <p>Is there maybe another way to do this using pandas or openpyxl?</p>
  
  <p>Thanks in advance!</p>