我正在尝试使用openpyxl模块加载.xlsx文件。下面的文件路径适用于xlrd模块,但是我已经尝试过此版本以及其他多个版本,包括仅带有openpyxl的“ pytestsheet.xlsx”。每次我收到FILENOTFOUNDERROR。这是在Mac上。
import openpyxl path = "~/Documents/pytestsheet.xlsx" wb = openpyxl.load_workbook(path)