Guest User

Untitled

a guest
Nov 12th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. import xlrd
  2. workbook = xlrd.open_workbook('/Users/reallymemorable/Documents/output.xlsx')
  3. worksheet = workbook.sheet_by_name('Sheet1')
  4. num_rows = worksheet.nrows
  5. curr_row = 0
  6.  
  7. #creates an array to store all the rows
  8. row_array = []
  9.  
  10. while curr_row < num_rows:
  11. row = worksheet.row(curr_row)
  12. row_array += row
  13. curr_row += 1
  14.  
  15. print(row_array[0])
  16.  
  17. 09/30/2018-09/26/2018
  18. 09/25/2018-09/21/2018
  19. 09/20/2018-09/16/2018
  20. 09/15/2018-09/11/2018
  21. 09/10/2018-09/06/2018
  22. 09/05/2018-09/01/2018
  23. 08/31/2018-08/27/2018
Add Comment
Please, Sign In to add comment