title: Erasing only a part of an excel with win32com and python
body: <p>I have 3 parameters.</p>
  
  <p>startLine, starColumn and width (here 2,8,3)</p>
  
  <p><img src="https://i.stack.imgur.com/fhGSV.png" alt="excel"></p>
  
  <p>How can I erase the selected area without writing blanks in each cells?
  (here there is only 30 line but there could potetialy be 10 000 lines)</p>
  
  <p>Right now I'm succesfully counting the number of lines but I can't manage to find how to select and delete an area</p>
  
  <pre><code>self.startLine = 2
  self.startColumn = 8
  self.width = 8
  
  self.xl = client.Dispatch("Excel.Application")
  self.xl.Visible = 1
  self.xl.ScreenUpdating = False
  self.worksheet = self.xl.Workbooks.Open("c:\test.xls")
  sheet = self.xl.Sheets("data")
  
  #Count the number of line of the record
  nb = 0
  while sheet.Cells(start_line + nb, self.startColumn).Value is not None:
      nb += 1
  
  #must select from StartLine,startColumn to startcolum+width,nb
  #and then erase
  
  self.worksheet.Save()
  </code></pre>
  
  <p>ps : the code works, I may have forgotten some part due do copy/pas error, in reality the handling of the excel file is managed by several classes inheriting from each other</p>
  
  <p>thanks</p>