Unable to read excel file content from box folder

新規投稿

コメント

5件のコメント

  • 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
    コメントアクション パーマリンク
  • 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
    コメントアクション パーマリンク
  • Shobin Joyakin

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

    pd.read_excel(io.BytesIO(item.content()))
    0
    コメントアクション パーマリンク
  • 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
    コメントアクション パーマリンク
  • 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
    コメントアクション パーマリンク

サインインしてコメントを残してください。