Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import webbrowser
- webbrowser.open('C:/Users/300231823/Desktop/GUI/simplenew4.xls')
- from win32com.client import Dispatch
- xl = Dispatch("Excel.Application")
- xl.Visible = True # otherwise excel is hidden
- # newest excel does not accept forward slash in path
- wb = xl.Workbooks.Open(r'C:Users300231823DesktopGUIsimplenew4.xls')
- wb.Close()
- xl.Quit()
- >>> app = xw.App() # or something like xw.apps[0] for existing apps
- >>> app.books['Book1']
Add Comment
Please, Sign In to add comment