-->

Open an existing excel workbook using pywinauto

2019-09-15 00:31发布

问题:

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