Skip to content

read_excel does not work on excel file binary text or buffered binary text object #15914

Closed
@alexanderwhatley

Description

@alexanderwhatley

Python 3.5, Pandas 0.19.2

I have the following excel file, and I am trying to read its binary content, and then have read_excel read the binary content in, except this is not working, and there may be a bug somewhere, as I have specified the engine for reading.

import pandas as pd
f = open("Test_Prom_Data.xlsx", "rb")
df = pd.read_excel(f.read(), engine = "xlrd")
Traceback (most recent call last):
File "", line 1, in
File "/home/alexander/anaconda3/lib/python3.5/site-packages/pandas/io/excel.py", line 191, in read_excel
io = ExcelFile(io, engine=engine)
File "/home/alexander/anaconda3/lib/python3.5/site-packages/pandas/io/excel.py", line 251, in init
raise ValueError('Must explicitly set engine if not passing in'
ValueError: Must explicitly set engine if not passing in buffer or path for io.
Test_Prom_Data.xlsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    Error ReportingIncorrect or improved errors from pandasIO Excelread_excel, to_excel

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions