The documentation for this was not much help, so in case somebody else searches for this hopefully this will help.
First of all I created new test data file pointing at my excel file
Then I looped through printing out the names using the following code in my test case
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
TestData data = findTestData('mydata')
for (def index : (0..data.getRowNumbers() - 1)) {
println ("First name =: " + data.internallyGetValue('firstname', index))
println ("Last name =: " + data.internallyGetValue('surname', index))
}
The output of which looked like this
You can see in the screenshot that each row of the excel file is printed as requested
While this is only printing to the console the same method can be used for other actions for example setting text
WebUI.setText(findTestObject('Page_SignUp/txt_FirstName'), data.internallyGetValue('firstname', index))
Hope this helps others