--end of row -- : : cherries --end of row -- : : pears --end of row --herewe specify that we want the cell objects in the rectangular area from to and we get generator object containing the cell objects in that area to help us visualize this generator objectwe can use tuple(on it to display its cell objects in tuple this tuple contains three tuplesone for each rowfrom the top of the desired area to the bottom each of these three inner tuples contains the cell objects in one row of our desired areafrom the leftmost cell to the right so overallour slice of the sheet contains all the cell objects in the area from to starting from the top-left cell and ending with the bottom-right cell to print the values of each cell in the areawe use two for loops the outer for loop goes over each row in the slice thenfor each rowthe nested for loop goes through each cell in that row to access the values of cells in particular row or columnyou can also use worksheet object' rows and columns attribute these attributes must be converted to lists with the list(function before you can use the square brackets and an index with them enter the following into the interactive shellimport openpyxl wb openpyxl load_workbook('example xlsx'sheet wb active list(sheet columns)[ get second column' cells (<cell 'sheet >for cellobj in list(sheet columns)[ ]print(cellobj valueapples cherries pears oranges apples bananas strawberries using the rows attribute on worksheet object will give you tuple of tuples each of these inner tuples represents rowand contains the cell objects in that row the columns attribute also gives you tuple of tupleswith each of the inner tuples containing the cell objects in particular working with excel spreadsheets