Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import win32com.client as win32
- excel = win32.gencache.EnsureDispatch('Excel.Application')
- wb = excel.Workbooks.Open(r"E:Python tempexample.xls")
- ws = wb.Worksheets("Sheet 1")
- print ws.Range("A1").Value.split('n')
- excel.Application.Quit()
- [u'line1', u'line2', u'line3']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement