Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

Python讀取excel(xlrd)小筆記

安装xlrd模块:
Windows下打開终端输入命令:
*Python3可以在命令提示符中输入

 
*Python2直接输入

验证安装是否成功:
在Windows终端输入 python, 進入python shell環境, 然後输入 import xlrd
不報錯誤訊息表示安装成功, 錯誤訊息:ImportError: No module named ‘xlrd’
该错误是因为Excel需要单独的模块支持,所以需要安装xlrd模块

範例一: 讀取特定excel檔名與sheet名稱的內容

發表迴響