Search code examples
c++pythonexcelwxpythonwxwidgets

Opening Excel in wxpython


Can I open excel spreadsheet as a reponse to event in wxpython? I want to build an application which entails the neccessity to interact with excel in visual mode? Is this possible? Can somebody provide me a brief example?


Solution

  • from win32com.client import DispatchEx
    xl = DispatchEx("Excel.Application")
    xl.Visible = 1
    xl.Workbooks.Open("somefile.xls")
    xl.Save("somefile.xls")