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 :param OrderedDict/dict sheets: a dictionary of data :param str filename: the physical file :param str path: the relative path or abosolute path :param set keywords: additional parameters to be passed on
Methods
__init__
([sheets, filename, path])Book constructor get_csv
(**keywords)get_csvz
(**keywords)get_django
(**keywords)Book.get_grid
Book.get_html
Book.get_json
Book.get_latex
Book.get_latex_booktabs
Book.get_mediawiki
get_ods
(**keywords)Book.get_orgtbl
Book.get_pipe
Book.get_plain
Book.get_rst
get_sheet
(array, name)Create a sheet from a list of lists Book.get_simple
get_sql
(**keywords)get_texttable
(**keywords)get_tsv
(**keywords)get_tsvz
(**keywords)get_xls
(**keywords)get_xlsm
(**keywords)get_xlsx
(**keywords)load_from_sheets
(sheets)Load content from existing sheets number_of_sheets
()Return the number of sheets register_presentation
(file_type)remove_sheet
(sheet)Remove a sheet save_as
(filename)Save the content to a new file save_to
(source)Save to a writeable data source 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 sheet_by_index
(index)Get the sheet with the specified index sheet_by_name
(name)Get the sheet with the specified name sheet_names
()Return all sheet names to_dict
()Convert the book to a dictionary Attributes
csv
csvz
django
Book.grid
Book.html
Book.json
Book.latex
Book.latex_booktabs
Book.mediawiki
ods
Book.orgtbl
Book.pipe
Book.plain
Book.rst
Book.simple
sql
texttable
tsv
tsvz
xls
xlsm
xlsx
-