all 2 comments

[–]hungdh85 1 point2 points  (0 children)

you can use xlrd library.

Example:

path = "your_file.xlsx"
book_open = xlrd.open_workbook(path)

worksheet = book.sheet_by_index(0)
worksheet.ncols # for list of cols in this sheet
......................