title: how to iterate through excel data source step in readyapi to pass values to grrovy test step
body: <p>I am novice in groovy scripting however trying to get some repetitive work done by automating a generation of an XML file creation.</p>
  
  <p>So the question is:</p>
  
  <p>I have an excel data source step in ready api and i would like to parametrize all values so they are passed to groovy script.
  At present if i hard code the values in script,  XML is formed as per schema however I need to iterate through all data in excel. so my test suite currently contains the following structure:</p>
  
  <ol>
  <li>Data source </li>
  <li>Groovy Script</li>
  <li>Data Source Loop</li>
  </ol>
  
  <p>I would like my data read each row at a time which will build XML elements as needed. So far I have the following code in script:</p>
  
  <pre><code>//package test
  
  import groovy.xml.MarkupBuilder
  
  /**
   * A Simple Example that builds an XML document.
   */
  
  
  class Test 
  {
      static main(args) 
      {
  
  
      def fileWriter = new FileWriter("c:/test.xml")
          def fileBuilder = new MarkupBuilder(fileWriter)
  
      fileBuilder.Header 
      {
  
  
  
          date ('') 
  
  
          Item
              {
                  SKU('')
                  Description('')
                  Amt('')
                  Qty('')
              }
  
       }
         fileWriter.close()
  
      }
  
  }
  </code></pre>
  
  <p>Looking forward to hearing from experts on this.</p>
  
  <p>Thanks</p>