fork download
  1.  
  2.  
  3. import xlrd
  4. #エクセルファイルを読み込んでリストに
  5. def readXLSX(name):
  6. book = xlrd.open_workbook(name)
  7. sheet = book.sheet_by_index(0)
  8. l=[]
  9.  
  10. #1行分のリストを追加
  11. for i in range(sheet.nrows):
  12. l.append(sheet.row_values(i) )
  13. return l
  14.  
  15.  
  16.  
  17. result = readXLSX("aiueo.xlsx")
  18.  
  19.  
  20.  
  21. print(result),print()
  22. print(list(zip(*result)))
Runtime error #stdin #stdout #stderr 0.04s 9272KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 3, in <module>
ImportError: No module named 'xlrd'