cancel
Showing results for 
Search instead for 
Did you mean: 

How do i read excel data as key value pair without using cell number

SOLVED
Highlighted
Contributor

How do i read excel data as key value pair without using cell number

I have an excel file that has data as following

filename - example.xlsx

 

USERNAME | PASSWORD

xxx@yyy.com   |  abcdefgh

 

I don't want to pass cell number instead, when i pass the email parameter as(xxx@yyy.com  ) i need to get the password(abcdefgh) value equivalent to the email id as we do in the key value pairing, there are many usernames like that in that excel.

How do i achieve this using testcomplete javascript.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Contributor

Yes you can do that very easily

 

I will just write the step you can code on it

 

1. Open Excel

2. Take the RowCount of the Username cell

3. Use For Loop (increasing i as row no) and check for the Username value you want

4. Once you find the correct i of Username, return the Coloum (PASSWORD) for the same i

 

Please let me know whether you need some help in the code.

View solution in original post

2 REPLIES 2
Highlighted
Frequent Contributor

Yes you can do that very easily

 

I will just write the step you can code on it

 

1. Open Excel

2. Take the RowCount of the Username cell

3. Use For Loop (increasing i as row no) and check for the Username value you want

4. Once you find the correct i of Username, return the Coloum (PASSWORD) for the same i

 

Please let me know whether you need some help in the code.

View solution in original post

Highlighted
Community Manager

Thank you anupamchampati 🙂

 

@abishekhari007 Did you get a chance to try what's suggested? What's your result?


Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Get properties of a web page element

See replies!

Compare images using the Region Checkpoint

See replies!

Compare HTML table with Excel file and correct data in Excel file

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!
Top Kudoed Authors