So far I've seen examples of invoking an Excel Application using pywinauto. Can I open an existing Excel Workbook using pywinauto ?
Asked
Active
Viewed 2,214 times
0
-
Could you clarify, the problem is how to run Excell using pywinauto? – SWAPYAutomation Sep 17 '13 at 09:48
-
No. The question is how to open an existing Excel workbook using pywinauto. – richie Sep 17 '13 at 09:58
-
If you need just to parse *.xls file try http://stackoverflow.com/questions/7372716/parsing-excel-documents-with-python – SWAPYAutomation Sep 18 '13 at 07:20
-
1Also you may automate via COM http://stackoverflow.com/questions/15467229/automation-excel-from-python – SWAPYAutomation Sep 18 '13 at 07:21
-
So, If I've understood you right, pywinauto cannot open existing excel workbooks. Correct? – richie Sep 18 '13 at 08:44
-
Richie, I cannot help you since I do not get your point. pywinauto probably can automate a UI, does not matter what's open – SWAPYAutomation Oct 07 '13 at 13:53
1 Answers
0
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

8bitwide
- 2,071
- 1
- 17
- 24