#####################
# drag from here for test #
#####################
import openpyxl
# open excel file
wb = openpyxl.load_workbook('excel_file_name.xlsx')
# read active sheet
ws = wb.active
# (another mothod) read sheet by name
# ws = wb.get_sheet_by_name("Sheet1")
# read row data
count = 1;
for r in ws.rows:
if not r[0].value:
# (another mothods) check None data of Excel
# if r[0].value == None:
# if r[0].value is None:
print("row[", count , "].value : None")
count++
# close opened Excel file
wb.close()
###################
# drag to here for test #
###################
- excel_file_name.xlsx
- Execution result
'python' 카테고리의 다른 글
[python] no support pyautogui.typewrite('UNICODE like 한글') (0) | 2019.08.18 |
---|---|
[python] crawling method by partial ids (0) | 2019.08.15 |
[python] for using cv2 (0) | 2019.08.12 |
[python] ModuleNotFoundError: No module named 'pip' (0) | 2019.08.11 |
[python - BeautifulSoup] crawling NAVER's realtimeKeyword (0) | 2019.08.05 |