Question

How do I validate cell data in an Excel sheet through TestIM?

  • 28 September 2023
  • 1 reply
  • 37 views

Can anyone provide an example of how to validate data in an Excel sheet downloaded via a TestIM test case?

I viewed the example provided here, but it only shows the means to extract the number of sheets in the spreadsheet and the title of the sheets, it does not provide an example of how to retrieve values from a cell (the value at cell A3 of the sheet) for example?

I’m rather new at creating custom actions so any help you can provide would be greatly appreciated. 

Thanks!


1 reply

Userlevel 5
Badge +3

I’m not familiar with TestIM much or know the language used here, but there is a Sheets collection passed in as a parameter shown at the link. In Excel programming, you usually refer to cells using this syntax:

Sheets[index number or (possibly case sensitive) name here].Range(“A3”)

Sheets[index or name].cells(3, 1)

 

the default property of both of these is “value”, it will return the cell text

Reply