title: Saving to the Desktop folder on Windows
body: <p>I have a problem with saving a file to the "Desktop" folder on Windows. I have two <code>try</code> statements. The first tries to save the file for a Mac. The second tries to save it for Windows. The second <code>except</code> handler defaults to saving the file in the same folder as the application. </p>
  
  <pre><code>try:
      wb = openpyxl.load_workbook(os.path.expanduser('~/Desktop/' + 
              dateCur + '_' + timeCur + '_bap_attendance.xlsx'))
  except:
      try:
          wb = openpyxl.load_workbook(os.getenv('%HOMEPATH%') + '\\Desktop\\' + 
              dateCur + '_' + timeCur + '_bap_attendance.xlsx')
      except:
          wb = openpyxl.load_workbook(
              self.manager.get_screen('offline').ids.label3.text)
  </code></pre>
  
  <p>When I get an error, it usually says that it was looking for <code>Users\BobSmith</code>, but the Windows account should actually have a space in the username. <code>getpass.getuser()</code> also returns "BobSmith", but I need to type "Bob Smith" to change to the directory and get to the "Desktop" folder.</p>