Python Forum

Full Version: Python Script-To perform automation of excel values which need to be feeded into we
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I have one requirement where we need to take data values from excel file where the number of columns are fixed which is 28 but rows keeps on changing it can be one or more than one which need to be feeded onto a webpage.

What I am using is :

1.Python script to read excel and using selenium webdriver to perform automation onto webpage.

I am able to read excel values from row 1 and feed it's values onto web page but again when I want to feed the excel values where row count will be greater than 1 I dont know how to do that.

import xlrd

book = xlrd.open_workbook("Job.xlsx")


data = [[worksheet.cell_value(r, col) 
                for col in range(0,worksheet.ncols)] 
                    for r in range(2,worksheet.nrows)]