pyexcel.get_sheet

pyexcel.get_sheet(**keywords)[source]

Get an instance of Sheet from an excel source

Parameters:
  • file_name – a file with supported file extension
  • file_content – the file content
  • file_stream – the file stream
  • file_type – the file type in content
  • session – database session
  • table – database table
  • model – a django model
  • adict – a dictionary of one dimensional arrays
  • url – a download http url for your excel file
  • with_keys – load with previous dictionary’s keys, default is True
  • records – a list of dictionaries that have the same keys
  • array – a two dimensional array, a list of lists
  • keywords – additional parameters, see Sheet.__init__()
  • sheet_name – sheet name. if sheet_name is not given, the default sheet at index 0 is loaded

Not all parameters are needed. Here is a table

source parameters
loading from file file_name, sheet_name, keywords
loading from memory file_type, content, sheet_name, keywords
loading from sql session, table
loading from sql in django model
loading from query sets any query sets(sqlalchemy or django)
loading from dictionary adict, with_keys
loading from records records
loading from array array
loading from an url url

see also A list of supported data structures