title: How to open, delete columns and save a xls file in python
body: <p>I need to know how to open a xls file that is already made, I want to delete some columns and then save the file. This is what I have but I get an error when I want to delete the columns. How do I use the DataFrame function to delete columns and then save.</p>
  
  <p><strong>Read in excel file</strong></p>
  
  <pre><code>Workbook = xlrd.open_workbook("C:/Python/Python37/Files/firstCopy.xls", on_demand=True)
  worksheet = Workbook.sheet_by_name("Sheet1")
  </code></pre>
  
  <p><strong>Delete a column</strong></p>
  
  <pre><code>df.DataFrame.drop(['StartDate', 'EndDate', 'EmployeeID'], axis=1, inplace=True)
  Workbook.save('output.xls')
  </code></pre>