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_gridBook.get_htmlBook.get_jsonBook.get_latexBook.get_latex_booktabsBook.get_mediawikiget_ods(**keywords)Book.get_orgtblBook.get_pipeBook.get_plainBook.get_rstget_sheet(array, name)Create a sheet from a list of lists Book.get_simpleget_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
csvcsvzdjangoBook.gridBook.htmlBook.jsonBook.latexBook.latex_booktabsBook.mediawikiodsBook.orgtblBook.pipeBook.plainBook.rstBook.simplesqltexttabletsvtsvzxlsxlsmxlsx-