code: def _save_xls(self, filepath):
          
  
          Interface = self.type2interface["xls"]
  
          workbook = xlwt.Workbook()
          interface = Interface(self.grid.code_array, workbook)
          interface.from_code_array()
  
          try:
              workbook.save(filepath)
  
          except IOError, err:
              try:
                  post_command_event(self.main_window, self.StatusBarMsg,
                                     text=err)
              except TypeError:
                  # The main window does not exist any more
                  pass
docs: Saves file as xls workbook
  
          Parameters
          ----------
  
          filepath: String
          \tTarget file path for xls file