HI am trying to open an excel using python codes on windows (python version is 3.6.10)
I used codes from the link Running an Excel macro via Python?
import win32com.client as wincl
excel_macro = wincl.DispatchEx("Excel.application")
excel_path = os.path.expanduser("Valuation.xlsm")
workbook = excel_macro.Workbooks.Open(Filename = excel_path, ReadOnly =1)
but the excel doesn't open at all, and I don't get any errors either!
if however I run the rest of the code to run the vba macro it does work fine (but the file still doesn't open)
excel_macro.Application.Run("Macro1")
excel_macro.Application.Quit()
del excel_macro
Question is, how do I simply open the excel file using python?