I am trying to create a dictionary from an xlsx file. Here is the code:
import pyexcel as pe
records = pe.get_records(file_name="testxl.xlsx")
Looking into the
pyexcel API documentation, the
get_records function loads the excel file line by line, providing a list of dictionaries with column headers as keys and field entries as values. If you happened to work with CSV (comma-separated-value) APIs - they tend to work the same way. It's simply the most straight-forward way to retrieve the tabular data.