Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExcelFile has non existent argument "kind" in the docstring #2613

gerigk opened this issue Dec 29, 2012 · 3 comments


Copy link

commented Dec 29, 2012

class ExcelFile(object):
    Class for parsing tabular excel sheets into DataFrame objects.
    Uses xlrd for parsing .xls files or openpyxl for .xlsx files.
    See ExcelFile.parse for more documentation

    path : string or file-like object
        Path to xls file
    kind : {'xls', 'xlsx', None}, default None
    def __init__(self, path_or_buf):
changhiskhan pushed a commit that referenced this issue Dec 29, 2012

This comment has been minimized.

Copy link

commented Dec 29, 2012

fixed. thanks!


This comment has been minimized.

Copy link

commented Dec 29, 2012

We might want to be able to explicitly specify the file format? Right now you have to have the extension right

@wesm wesm reopened this Dec 29, 2012


This comment has been minimized.

Copy link

commented Dec 30, 2012

I found out also, that if it is a buffer it tries to read it as an ".xls" and then silently falls back to ".xlsx" in case of an ImportError.
Since I had only openpyxl installed this resulted in a unicode error when opening a xls buffer.

data =

                import xlrd
       = xlrd.open_workbook(file_contents=data)
                self.use_xlsx = False
            except Exception:
                from openpyxl.reader.excel import load_workbook
                buf = py3compat.BytesIO(data)
       = load_workbook(buf, use_iterators=True)

The 'kind' argument would help here.

@ghost ghost assigned wesm Jan 20, 2013

@wesm wesm closed this in 61f7320 Jan 20, 2013

changhiskhan added a commit that referenced this issue Jan 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.