Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. import win32com.client as win32
  2. excel = win32.gencache.EnsureDispatch('Excel.Application')
  3.  
  4. wb = excel.Workbooks.Open(r"E:Python tempexample.xls")
  5. ws = wb.Worksheets("Sheet 1")
  6. print ws.Range("A1").Value.split('n')
  7. excel.Application.Quit()
  8.  
  9. [u'line1', u'line2', u'line3']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement