Skip to content

Instantly share code, notes, and snippets.

@sugiana
Created February 23, 2016 06:04
Show Gist options
  • Save sugiana/06d983befc8ec05e675a to your computer and use it in GitHub Desktop.
Save sugiana/06d983befc8ec05e675a to your computer and use it in GitHub Desktop.
# pip install xlrd
import sys
from xlrd import open_workbook
filename = sys.argv[1]
wb = open_workbook(filename)
sheet = wb.sheet_by_index(0)
for row in range(sheet.nrows):
for col in range(sheet.ncols):
value = sheet.cell(row, col)
print('Row {row} Col {col} {value}'.format(row=row, col=col,
value=value))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment