def download_file(service, drive_file):
  """Download a file's content.

  Args:
    service: Drive API service instance.
    drive_file: Drive File instance.

  Returns:
    File's content if successful, None otherwise.
  """
  download_url = drive_file[u'exportLinks'][u'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']
  # https://docs.google.com/spreadsheets/export?id=1B-OeCz6zAbZToSuSgN21u7vvdNjTZPxPEpcVzl1LBcY&exportFormat=xlsx
  # xlsx shold be changed to ods
  download_url = download_url.replace('xlsx','ods')

  if download_url:
    resp, content = service._http.request(download_url)
    if resp.status == 200:
      return content
    else:
      print ('An error occurred: %s' % resp)
      return None
  else:
    # The file doesn't have any content stored on Drive.
    return None