Forum Discussion

Azeddin_Margani's avatar
Azeddin_Margani
Contributor
8 years ago

Removing brackets [ ] from excel when added from soapui response using Groovy..

Hi,

 

Can someone please help!. I want to remove the brackets [ text] and just leave text when reading soapui response.  My intended code in Groovy:

......

//read response from xml

def  resholder  = groovyUtils.getXmlHolder(reqOperationName+"#Response")

    resTagValue1 = resholder.getNodeValues("//*:Isrn")

 

//write response value in xls

 Label resTagValue1 new Label(2, Row, resTagValue1.toString());

 Sheet1.addCell(resTagValue1);

....

 

When the value of resTagValue1 written into .xls, it showing as: [text] or [12344]. I would like them to be showing as: text or 12344

 

Any suggestions on how the brackets [  ] can be removed?.

 

Thanks in advanced..