Python can be used to read data from an excel file. The module called
xlrd is used to retrieve information from a spreadsheet.
Command to install xlrd module:
pip install xlrd
A workbook contains the data in the Excel file.
import xlrd location = ("path of file") #to open excel using open_workbook() wb = xlrd.open_workbook(location) # open a sheet using index sheet = wb.sheet_by_index(0) # open a sheet using name of the sheet #print(sheet.sheet_by_name('name_of_sheet')) # printing row 0 and column 0 print(sheet.cell_value(0, 0)) # printing row 0 and column 1 print(sheet.cell_value(0, 1))