Question: Given an existing EXCEL file, write functions CountRows and CountCols that use the package openpyxl to perform each of the following tasks (make the worksheet

Given an existing EXCEL file, write functions CountRows and CountCols that use the package openpyxl to perform each of the following tasks (make the worksheet variable an input parameter):

a. Given the row and column numbers of a starting cell with a value in it, return the number of consecutive nonempty cells to the right of (and including) the starting cell, until finding the first empty cell.

b. Given the row and column numbers of a starting cell with a value in it, return the number of consecutive nonempty cells below (and including) the starting cell, until finding the first empty cell.

Include a main program that asks the user to enter the location and name of the EXCEL file and then allows the user to enter the row and column numbers of a starting cell and reports the number of consecutive cells both to the right and also below the starting cell.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!