MSDotNetBuddy
The blog is to experiment with various technologies.
Search This Blog
2023/10/01
Python: read xls
import
xlrd
book
=
xlrd
.
open_workbook
(
"location.xls"
)
sh
=
book
.sheet_by_index(
0
)
for
rx
in
range
(
sh
.nrows):
for
col
in
range
(
sh
.ncols):
print
(
sh
.cell_value(
rx
,
col
)
+
' '
,
end
=
''
)
print
(
'
\n
'
,
end
=
''
)
# pip install xlrd
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment