Open an existing excel workbook using pywinauto

半世苍凉 提交于 2019-12-13 20:55:24

问题


So far I've seen examples of invoking an Excel Application using pywinauto. Can I open an existing Excel Workbook using pywinauto ?


回答1:


You Don't even need pywinauto for this. Just open excel with subprocess and use command line switches to open your doc

But if you insist on using pywinauto

Then Try

.MenuSelect("File -> Open")

Then

.Edit.TypeKeys("*Filename with absolutepath*", with_spaces = True)

Then

.No.Click()

Or something to that effect if those are not the actual elements names



来源:https://stackoverflow.com/questions/18843602/open-an-existing-excel-workbook-using-pywinauto

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!