Forum Discussion

bo8ster's avatar
bo8ster
Occasional Contributor
14 years ago

Get specific rows from an excel data source.

Hi all

Currently, the fields in the request have a one-one relation to fields within excel, thus one row per request from one worksheet, works great.
I now have the issue where I have a one to many relation within data across different worksheets.

An example might be to send organisation details like the name and a list of names within the organisation like:
“Organisation 1” has
“Bob”
“Job”
“Barry”
Where organisations and names are stored in different worksheets (like tables) say org and name.

Within the request I wish to iterate the data source like ${organisations#name[1]} and ${name#firstname[1]}, ${name#firstname[2]}, ${name#firstname[3]} so I can send all the data in one request.

The Data Source Loop is good but only allows one row at a time to be extracted; I need many rows extracted from different work sheets between requests - ${name#firstname} only gets the last read row.

Can this be done in Groovy? I tried context.expand( '${WageData#Pay}' ) but again I can’t choose the rows I wish.
If it cannot be done, any suggested work arounds?

I am using SoapUI Pro 3.0.1.

Thanks!

bo8ster

1 Reply

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hello,

    It could be done using Groovy and a third party Excel library (soapUI uses jexcel internally, but you can use a different one if you wish, just include it in the bin/ext directory). Unfortunately this falls outside of the realm of what we offer support for, so you would be on your own in getting it to work, but it's definately possible!
    Good luck!

    Regards,
    Dain
    eviware.com