[英]How to open an excel file and then click a button by python?
When I open and excel file, the excel show me a message.当我打开 excel 文件时,excel 会显示一条消息。
"Do you want to open this excel file anyway?" “你还是要打开这个 excel 文件吗?” Yes, No, Cancel
是,否,取消
I want to open it by python and automatically click Yes by python too.我想通过 python 打开它,然后通过python自动单击是。 I don't know what to do.
我不知道该怎么办。 I am totally beginner in python.
我完全是 python 的初学者。 I would be grateful if anyone can help me.
如果有人可以帮助我,我将不胜感激。
What are you using to open your file using python, and what do you mean open?你用什么来使用 python 打开你的文件,你是什么意思打开? This works for me:
这对我有用:
pd.read_excel('example.xlsx')
more on it here: https://pandas.pydata.org/docs/reference/api/pandas.read_excel.html更多信息在这里: https://pandas.pydata.org/docs/reference/api/pandas.read_excel.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.