Skip to content

Simple and memory-efficient way to read the whole Excel book as "records" #144

Description

@patarapolw

If it is possible, it want to use pyexcel.iget_records().

What I have got now is:-

data = OrderedDict()
raw_data = pyexcel.get_book(file_name='filename.xlsx')
for sheet_name in raw_data.sheet_names():
    raw_data[sheet_name].name_columns_by_row(0)
    data[sheet_name] = raw_data[sheet_name].to_records()
pyexcel.free_resources()

But .to_records() doesn't seem to be a memory-efficient way as it generates a list, not a generator. Also, why do I have to call raw_data[sheet_name].name_columns_by_row(0) explicitly?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions