title: Using Python to download files from Box
body: <p>I'm trying to use Python to download an Excel file to my local drive from Box.</p>
  
  <p>Using the boxsdk I was able to authenticate via OAuth2 and successfully get the file id on Box.</p>
  
  <p>However when I use the <code>client.file(file_id).content()</code> function, it just returns a string, and if I use <code>client.file(file_id).get()</code> then it just gives me a <code>boxsdk.object.file.File</code>.</p>
  
  <p>Does anybody know how to write either of these to an Excel file on the local machine? Or a better method of using Python to download an excel file from Box.</p>
  
  <p>(I discovered that <code>boxsdk.object.file.File</code> has an option <code>download_to(writeable_stream</code> <a href="http://box-python-sdk.readthedocs.io/en/latest/boxsdk.object.html" rel="noreferrer">here</a> but I have no idea how to use that to create an Excel file and my searches haven't been helpful).</p>