I am using anaconda python 3 and SAP GUI 770. I am trying to create an SAP GUI automate program and create an application on other devices.
When the program arrive export spreadsheet method it stops working with this error:
pywintypes.com_error: (-2147352567, 'Exception occurred.', (619, 'SAP Frontend Server', 'The control could not be found by id.', 'C:\Program Files (x86)\SAP\FrontEnd\SAPgui\sapfront.HLP', 393215, 0), None)
and when saving the file I have material Document list dialog window and the other device has windows dialog window

Code:
session.findById("wnd[1]/usr/ctxtDY_PATH").text = folderdir
session.findById("wnd[1]/usr/ctxtDY_FILENAME").text = filename
session.findById("wnd[1]/usr/ctxtDY_FILENAME").caretPosition = 3
session.findById("wnd[1]/tbar[0]/btn[0]").press()
I found a solution. I just paste this line and it's all good now. I hope to help somebody with this.