Python Forum
Python Script-To perform automation of excel values which need to be feeded into we
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Script-To perform automation of excel values which need to be feeded into we
#1
Hi,

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")

worksheet=book.sheet_by_name('Test')

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





a=data[0][1]

print(a)
Reply
#2
try using pandas: https://pandas.pydata.org/pandas-docs/ve...excel.html
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Automation WEB sel+Python ABVSVL 3 2,025 Jul-02-2020, 03:50 PM
Last Post: snippsat
  Automation Engine on Python? jfha73 4 2,040 May-01-2020, 02:29 PM
Last Post: jfha73
  How to perform a successful login(signin) through Requests in Python Kalet 1 2,304 Apr-24-2020, 01:44 AM
Last Post: Larz60+
  Is it possible to perform a PUT request by passing a req body instead of an ID ary 0 1,793 Feb-20-2019, 05:55 AM
Last Post: ary
  How to perform predictions on a data in csv file using Flask? manjusavanth 0 4,489 May-23-2018, 09:03 AM
Last Post: manjusavanth
  [Intermediate] Python web Automation testing vardhhan 0 3,472 Feb-18-2018, 06:23 AM
Last Post: vardhhan
  Python Selenium Document Lookup and Download Automation Error - Target Machine active Guttmann 4 5,156 Apr-18-2017, 12:13 AM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020