pyexcel.Book
- class pyexcel.Book(sheets=None, filename='memory', path=None)[source]
Read an excel book that has one or more sheets
For csv file, there will be just one sheet
- __init__(sheets=None, filename='memory', path=None)[source]
Book constructor
Selecting a specific book according to filename extension
- Parameters:
sheets – a dictionary of data
filename – the physical file
path – the relative path or absolute path
keywords – additional parameters to be passed on
Methods
__init__([sheets, filename, path])Book constructor
get_array(**keywords)Get data in array format
get_bookdict(**keywords)Get data in bookdict format
get_csv(**keywords)Get data in csv format
get_csvz(**keywords)Get data in csvz format
get_dict(**keywords)Get data in dict format
get_fods(**__)fods getter is not defined.
get_handsontable(**keywords)Get data in handsontable format
get_handsontable_html(**keywords)Get data in handsontable.html format
get_html(**__)html getter is not defined.
get_ods(**keywords)Get data in ods format
get_pdf(**__)pdf getter is not defined.
get_queryset(**__)queryset getter is not defined.
get_records(**keywords)Get data in records format
get_svg(**keywords)Get data in svg format
get_texttable(**keywords)Get data in texttable format
get_tsv(**keywords)Get data in tsv format
get_tsvz(**keywords)Get data in tsvz format
get_url(**__)url getter is not defined.
get_xls(**keywords)Get data in xls format
get_xlsb(**__)xlsb getter is not defined.
get_xlsm(**keywords)Get data in xlsm format
get_xlsx(**keywords)Get data in xlsx format
init([sheets, filename, path])indpendent function so that it could be called multiple times
load_from_sheets(sheets)Load content from existing sheets
Return the number of sheets
plot([file_type])Visualize the data
register_input(file_type, *[, ...])create custom attributes for each class
register_io(file_type, *[, instance_name, ...])create custom attributes for each class
register_presentation(file_type, *[, ...])create custom attributes for each class
remove_sheet(sheet)Remove a sheet
save_as(filename, **keywords)Save the content to a new file
save_to_database(session, tables[, ...])Save data in sheets to database tables
save_to_django_models(models[, ...])Save to database table through django model
save_to_memory(file_type[, stream])Save the content to a memory stream
set_array(content, **keywords)Set data in array format
set_bookdict(content, **keywords)Set data in bookdict format
set_csv(content, **keywords)Set data in csv format
set_csvz(content, **keywords)Set data in csvz format
set_dict(content, **keywords)Set data in dict format
set_fods(content, **keywords)Set data in fods format
set_handsontable(_y, **_z)handsontable setter is not defined.
set_handsontable_html(_y, **_z)handsontable.html setter is not defined.
set_html(content, **keywords)Set data in html format
set_ods(content, **keywords)Set data in ods format
set_pdf(content, **keywords)Set data in pdf format
set_queryset(content, **keywords)Set data in queryset format
set_records(content, **keywords)Set data in records format
set_svg(_y, **_z)svg setter is not defined.
set_texttable(_y, **_z)texttable setter is not defined.
set_tsv(content, **keywords)Set data in tsv format
set_tsvz(content, **keywords)Set data in tsvz format
set_url(content, **keywords)Set data in url format
set_xls(content, **keywords)Set data in xls format
set_xlsb(content, **keywords)Set data in xlsb format
set_xlsm(content, **keywords)Set data in xlsm format
set_xlsx(content, **keywords)Set data in xlsx format
sheet_by_index(index)Get the sheet with the specified index
sheet_by_name(name)Get the sheet with the specified name
Return all sheet names
sort_sheets([key, reverse])to_dict()Convert the book to a dictionary
Attributes
arrayGet/Set data in/from array format
Get/Set data in/from bookdict format
Get/Set data in/from csv format
Get/Set data in/from csvz format
dictGet/Set data in/from dict format
fodsSet data in fods format
handsontableGet data in handsontable format
handsontable_htmlGet data in handsontable.html format
htmlSet data in html format
Get/Set data in/from ods format
pdfSet data in pdf format
querysetSet data in queryset format
recordsGet/Set data in/from records format
Return a stream in which the content is properly encoded
svgGet data in svg format
texttableGet data in texttable format
Get/Set data in/from tsv format
Get/Set data in/from tsvz format
Set data in url format
Get/Set data in/from xls format
xlsbSet data in xlsb format
Get/Set data in/from xlsm format
Get/Set data in/from xlsx format