Forum Discussion

AnandKiran's avatar
AnandKiran
Frequent Contributor
16 years ago

How to save the response tag values in the Excel sheet using groovy script

Hi Ole,
           We are facing a small issue  , the requirement is- once the response is received we have to save the values of the response to the excel sheet . Here we are using on SOAP UI not the SOAP UI PRO version.

I am able to save the response values in HOLDER using the below script

def holder = groovyUtils.getXmlHolder ("add#Response")


and i can get the required node value using the script

holder.getNodeValue("//n:addResponse/n:Result")



Now i want to save the result into the excal sheet ...

How can we do it using groovy script, can you help me on this.

Thanks
With Regards
Anand Kiran

4 Replies

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

    SoapUI does not include an Excel library for doing this. Using a third party library, JExcel for instance, this could be achieved, though instructions on doing so are beyond the scope of our support area.

    SoapUI Pro however, comes with this functionality built in, in the form of data sinks (more info).
    This functionality can also be accessed directly from Groovy.
  • AnandKiran's avatar
    AnandKiran
    Frequent Contributor
    Hi Ole,
              Can you give me an idea of writing a groovy script for data sink in SOAP UI , i have placed the Jexcel jar file in ext folder . Now how to write a groovy which reflects the data sink .

    Thanks
    With Regards
    Anand Kiran
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Sorry, this would be out of the scope of our free support. You could check out this link, which should help you in the right direction.

    Good luck!

    Regards,
    Dain
  • Hi Anand,

    I am also looking for a similar kind of script to export the data from groovy script to an Excel file.
    I am able to achieve the same in Soapui pro version.
    It would be helpful if you can help me on this.
    Thanks in Advance.