Step1 安装pandas和openpyxl
pip install pandas openpyxl
Step2 代码
import pandas as pd df = pd.read_excel(r'C:\Users\17521707887\Desktop\\New Microsoft Excel 工作表.xlsx') data=df.values print("获取到所有的值:\n{}".format(data))
pip install pandas openpyxl
import pandas as pd df = pd.read_excel(r'C:\Users\17521707887\Desktop\\New Microsoft Excel 工作表.xlsx') data=df.values print("获取到所有的值:\n{}".format(data))