Skip to content

Instantly share code, notes, and snippets.

@wannaphong
Created August 14, 2018 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wannaphong/53370849a2487003a9e0cfc10a8f4dd5 to your computer and use it in GitHub Desktop.
Save wannaphong/53370849a2487003a9e0cfc10a8f4dd5 to your computer and use it in GitHub Desktop.
from openpyxl import load_workbook
wb = load_workbook(filename = 'sample.xlsx') #อ่านไฟล์ sample.xlsx
sheet_ranges = wb['hello'] #เรียกใช้ worksheet ที่ชื่อว่า hello
print(sheet_ranges['A1'].value) #อ่านค่าจากเซลส์ A1 ใน worksheet ของ hello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment