#####################

# 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

 

+ Recent posts