xxxxxxxxxx
wb = load_workbook('file.xlsx', data_only=True)
xxxxxxxxxx
import pandas as pd
df = pd.read_excel (r'Path where the Excel file is stored\File name.xlsx')
print (df)
xxxxxxxxxx
import pandas as pd
# Specify the file path of the Excel file
excel_file = "path/to/your/file.xlsx"
# Read the Excel file and store it in a DataFrame
df = pd.read_excel(excel_file)
# Print the contents of the DataFrame
print(df)
xxxxxxxxxx
#My excel file is in the same location as my
EXCEL_FILE = 'Demo_excelsheet.xlsx'
df = pd.read_excel(EXCEL_FILE)
xxxxxxxxxx
conda install -c anaconda xlrd
#libarary that reads excel file
df = pd.read_excel (r'Path where the Excel file is stored\File name.xlsx', sheet_name='your Excel sheet name')