Skip to content

Instantly share code, notes, and snippets.

@m5knt
Last active February 1, 2017 02:59
Show Gist options
  • Save m5knt/05ef872859611384a41a55cd26ad76a1 to your computer and use it in GitHub Desktop.
Save m5knt/05ef872859611384a41a55cd26ad76a1 to your computer and use it in GitHub Desktop.
python で excel をダンプ
import openpyxl
book = openpyxl.load_workbook(filename='a.xlsx',
read_only=True,
use_iterators=True,
data_only=True)
sheet = book.get_sheet_by_name('Sheet1')
datas = [t for t in sheet.iter_rows()]
for rows in datas:
print([type(cell.value) for cell in rows])
print([cell.value for cell in rows])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment