I'm trying to use Python to download an Excel file to my local drive from Box.
Using the boxsdk I was able to authenticate via OAuth2 and successfully get the file id on Box.
However when I use the client.file(file_id).content()
function, it just returns a string, and if I use client.file(file_id).get()
then it just gives me a boxsdk.object.file.File
.
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.
(I discovered that boxsdk.object.file.File
has an option download_to(writeable_stream
here but I have no idea how to use that to create an Excel file and my searches haven't been helpful).