Reading data from excel
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Reading data from excel
Hi,
I want to read data from a different cell each time my script runs.
I have created a variable and set its mode as LastOperationResult however it is reading the data from the same cell specified in the cell fields while creating the readexcel variable.
How can we achieve this?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should put the variable under persistent project variables, if you +1 that one it saves it for next time.
That variable is your row counter, then just select cells by using ""A "+ Project.Variables.Row" & ""B "+ Project.Variables.Row" etc.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you using keyword test? Are you referring to data driven testing? How are you reading the first cell?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if you're reading the rows one by one you could also do someting like this:
It sets the variables to value by parameterized excelfile, sheetname, cell name: Cell A +rowcounter
Its in VBScript so might not work exactly like this for you.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's a built-in function that will help. There are examples for Keyword Tests and Scripts.
