Welcome to the new Box Support website. Check out all the details here on what’s changed.

Unable to read excel file content from box folder

New post

Comments

5 comments

  • Alex Novotny

    To my knowledge, you would have to use a third party library to actually see the contents of a file. The public Box API doesn't programmatically have access to the underlying data within any content. There shouldn't be any restrictions on the Box side from downloading the file and using a third party library to parse through it.

    0
    Comment actions Permalink
  • Shobin Joyakin

    Hi Neha. Have you found a way to read Excel file in Box? I am also running into the same issue. 

    Hi Alex,

    Is Box encoding Excel files in a different format? I am able to read text and csv files after decoding them to utf-8 format, but that doesnt work with excel file. These excel files would read just fine in local but I wont be able to download them to my local.

    0
    Comment actions Permalink
  • Shobin Joyakin

    I found a way out to read Excel files. This worked for me..

    pd.read_excel(io.BytesIO(item.content()))
    0
    Comment actions Permalink
  • Shobhit Bhatt

    Hi Shobin Joyakin: I am trying to reed the excel file from box and then parse the data. Is it something you also did?

    0
    Comment actions Permalink
  • Shobin Joyakin

    Yes.. Thats what I did. The below code should help you read the excel file.

        items = client.folder(folder_id=inputfolder).get_items()
      for item in items:
        df= pd.read_excel(io.BytesIO(item.content()))
    0
    Comment actions Permalink

Please sign in to leave a comment.