How could I close Excel file using pywinauto
<p>I'm having a problem that I can't excel file.</p>

<p>I was using swapy+pywinauto.<br>
program export excel file with different name (ex. time..) 
I used swapy to close the export excel.</p>

<pre><code>from pywinauto.application import Application
app = Application().Start(cmd_line=u'"C:\\Program Files\\Microsoft Office\\Office14\\EXCEL.EXE" \\dde')
xlmain = app.XLMAIN
xlmain.Wait('ready')
xlmain.Close()
app.Kill_()
</code></pre>

<p>but got error below.</p>

<pre><code>Traceback (most recent call last):


 File "D:/23007.py", line 54, in &lt;module&gt;
xlmain.Wait('ready')

WaitUntil(timeout, retry_interval, lambda: self.__check_all_conditions(check_method_names))


File "C:\Python35\lib\site-packages\pywinauto\timings.py", line 308, in WaitUntil
raise err

pywinauto.timings.TimeoutError: timed out

Process finished with exit code 1
</code></pre>

<p><a href="https://i.stack.imgur.com/c1BOC.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c1BOC.jpg" alt="enter image description here"></a></p>