I did it, so make a note.
Download the latest version below in advance from pypi.org
name | format | Remarks |
---|---|---|
openpyxl | .whl | |
jdcal | .whl | Required for openpyxl. |
et_xmlfile | setup.py | Required for openpyxl. tar.Only gz format can be downloaded, so unzip it |
py -m pip install .\jdcal-1.4.1-py2.py3-none-any.whl # py -By putting m at the beginning, you can hit pip even if pip does not have PATH.
python .\dist\et_xmlfile-1.0.1\setup.py install --user #If user is not specified, it will be installed in the current directory.
py -m pip install .\openpyxl-3.0.5-py2.py3-none-any.whl
A script that displays all Sheet names and the number of Sheets in sample.xlsx
get_sheet_names.py
import openpyxl
book = openpyxl.load_workbook("sample.xlsx")
names = book.sheetnames
print(names)
print("---------")
print(len(names))
Recommended Posts