I haven't tested it but you can apparently do it with python
import xlwings as xw
# Update these paths
iqy_file_path = r"C:\\Path\\To\\Your\\File.iqy"
excel_file_path = r"C:\\Path\\To\\Your\\Workbook.xlsx"
# Launch Excel
app = xw.App(visible=True)
wb = app.books.open(excel_file_path)
# Choose the sheet
sheet = wb.sheets['Sheet1']
# Refresh all queries
wb.api.RefreshAll()
# Save and close
wb.save()
wb.close()
app.quit()
print("Excel workbook refreshed with .iqy data.")