Forum Discussion

mani1's avatar
Occasional Contributor
8 years ago

How to write the Soap response in to an existing excel file in specific cell



Can any one help me,  how to write the Soap response in to an existing excel file in specific cell, I tried a lot, but not able to find solution yet.


I am able to save the response in to new excel file. I am new to soapUI and groovy scripting. Please let me know if any other details are required from my end.


Thanks & Regards,

Murugan Chelliah






4 Replies

  • nmrao's avatar
    Champion Level 3
    If you search (either on internet or in this forum), am sure you get sample code snippets. Doesn't it work?
    • mani1's avatar
      Occasional Contributor

      Hi Rao,


      Thanks for your quick response.

      Yes, I tried, searched in intranet and in forum, but I didn't get the correct sample code.  Can you please help me on this..


      I tried the below code, But it is giving the error  " unable to recognize OLE stream"


      import jxl.*
      import jxl.write.*

      def groovyUtils = new context )
      def holder = groovyUtils.getXmlHolder("validateFile#Response")
      //def request=groovyUtils.getXmlHolder("validateFile#Request") holder.getXml()

      def inputDataFileName= "D:\\userdata\\mchellia\\Desktop\\SSDP\\SSDP Test Automation\\NSCMD\\InputValues\\tmp_input_copy1.xls"
      def inputDataSheetName="Sheet1"
      Workbook workbook = Workbook.getWorkbook(new File(inputDataFileName));
      WritableWorkbook copy = Workbook.createWorkbook(new File(inputDataFileName),workbook);
      WritableSheet sheetl = copy.getSheet(inputDataSheetName);

      xPath1 = "//*:uniqueid/text()" holder.getNodeValue(xPath1)

      Cell cell2Update = sheet.getRow(3).getCell(19);