Created
March 16, 2018 17:00
-
-
Save agyeiarcher/a121875f739bfe665ca042575faca0be to your computer and use it in GitHub Desktop.
xlrd: Connect to a Database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from xlrd import open_workbook | |
wb = open_workbook('simple.xls') | |
for s in wb.sheets(): | |
print 'Sheet:',s.name | |
for row in range(s.nrows): | |
values = [] | |
for col in range(s.ncols): | |
values.append(s.cell(row,col).value) | |
print ','.join(values) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment