Excel Updater
2024-03-01
Excel Updater
Purpose This small program automates the process of updating Excel data connections. Tried to use pandas, openpyxl in the past, but could never get it to work.
Rough Idea
See Github for full code: Excel Updater
import win32com.client
import pythoncom
filepath = 'some_file.xlsx'
pythoncom.CoInitialize()
excel_app = win32com.client.Dispatch("Excel.Application")
workbook = excel_app.Workbooks.Open(filepath)
workbook.RefreshAll()