python对于Excel文件的操作,为啥有的文件打不开???

Python
电脑有这个文件为什么找不到这个文件,但在pycharm里面的Excel的文件才可以被打开,在桌面上的文件没法被打开

Python
图2的红框里面的提示为啥不显示sheetnames等提示

附言 1  ·  1年前

请求大佬们帮助,谢谢各位大佬!!!

讨论数量: 1
Jason990420

电脑有这个文件为什么找不到这个文件

Check if the path for your Excel file and os.getcwd() are the same, and try to give full path of your excel file.

提示为啥不显示

PyCharm cannot confirm what type of value returned from load_workbook, so you can add type hint

wb:Workbook = load_workbook("d:/test.xlsx")
1年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!