df = pd.read_excel('Path.xlsx', sheet_name='Desired Sheet Name')
xl = pd.ExcelFile('foo.xls')
xl.sheet_names
import pandas as pd
df = pd.read_excel (r'Path where the Excel file is storedFile name.xlsx')
print (df)
import os
from pathlib import Path
# opening EXCEL through Code
#local path in dir
absolutePath = Path('../excel.xlsx').resolve()
os.system(f'start excel.exe "{absolutePath}"')
#My excel file is in the same location as my
EXCEL_FILE = 'Demo_excelsheet.xlsx'
df = pd.read_excel(EXCEL_FILE)
#Creating the ExcelFile object
xls = pd.ExcelFile(r'Path.xlsx')
#In the next step, you can pass the ExcelFile object to read_excel to import
#its content, instead of the path to the file.
data = pd.read_excel(xls, sheet_name='Name_of_sheet', index_col='Index_Column')
$ sudo pip3 install openpyxl
#!/usr/bin/env python
from openpyxl import Workbook
import time
book = Workbook()
sheet = book.active
sheet['A1'] = 56
sheet['A2'] = 43
now = time.strftime("%x")
sheet['A3'] = now
book.save("sample.xlsx")
book = Workbook()
sheet = book.active
conda install -c anaconda xlrd
#libarary that reads excel file
df = pd.read_excel (r'Path where the Excel file is storedFile name.xlsx', sheet_name='your Excel sheet name')
from openpyxl import Workbook