Skip to content

Commit 15e4ff8

Browse files
authored
Python Read Excel File using xlrd
Python Read Excel File using xlrd
1 parent 589a344 commit 15e4ff8

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

read_excel.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import xlrd
2+
3+
workbook = xlrd.open_workbook('D:\ToriCode\Python\sample.xlsx')
4+
sheet = workbook.sheet_by_index(0)
5+
6+
for row in range(sheet.nrows):
7+
values = []
8+
for col in range(sheet.ncols):
9+
cell_value = sheet.cell_value(row, col)
10+
values.append(cell_value)
11+
print(','.join(values))

sample.xlsx

9.23 KB
Binary file not shown.

0 commit comments

Comments
 (0)