I think you are saying that you have an Excel spreadsheet which imports
data from an ODBC data source, as talked about in Overview of connecting to
(importing) data
https://support.office.com/en-ca/article/Overview-of-connecting-to-importing-data-c0ad7aec-ff1a-4e48-9c21-dc18a102433f
.
If that is
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