Carl E. Evans
2015-06-22 14:56:48 UTC
I have the following code:
import win32com.clientimport os
file1= r'C:\\Users\file.xlxm'
def refresher():
if os.path.exists(file1):
xl = win32com.client.DispatchEx("Excel.Application")
xl.Workbooks.Open(Filename=file1,ReadOnly=1)
xl.Visible = 1
xl.Workbooks(1).Close(SaveChanges=1)
xl.Application.Quit()
del xl
refresher()
Which gets me into the file, but I am unsure of how to refresh a ODBC
connected table that requires a simple form submission of user credentials.
The current settings dont allow me to save credentials so a script seems to
be the only solution. Any suggestions?
This will allow me to quickly update my models without have to do it
manually in excel.
Thanks!
import win32com.clientimport os
file1= r'C:\\Users\file.xlxm'
def refresher():
if os.path.exists(file1):
xl = win32com.client.DispatchEx("Excel.Application")
xl.Workbooks.Open(Filename=file1,ReadOnly=1)
xl.Visible = 1
xl.Workbooks(1).Close(SaveChanges=1)
xl.Application.Quit()
del xl
refresher()
Which gets me into the file, but I am unsure of how to refresh a ODBC
connected table that requires a simple form submission of user credentials.
The current settings dont allow me to save credentials so a script seems to
be the only solution. Any suggestions?
This will allow me to quickly update my models without have to do it
manually in excel.
Thanks!
--
-----
Carl E. Evans | Economist
-----
Carl E. Evans | Economist