title: Trying to write results in excel sheet column Result using UFT
body: <p>Hello I am using the following code and trying to write the results in the excel sheet column name result, but it's not writing the results in it, however, it will export the sheet but wouldn't write the result. Can you please help me with what I am missing here? All the help is much appreciated. Thanks.</p>
  
  <pre><code>DataTable.AddSheet "TestCases"
  DataTable.AddSheet "TestSteps"
  
  DataTable.ImportSheet "this is the excel sheet", "Tcases", "TestCases"
  DataTable.ImportSheet "this is the excel sheet", "Tsteps", "TestSteps"
  
  testcasecount = DataTable.GetSheet("TestCases").GetRowCount
  
  For i = 1 To testcasecount
  
      DataTable.GetSheet("TestCases").SetCurrentRow (i)
  
      If DataTable.Value("Execution", "TestCases") = "Yes" Then
  
          stestcaseid = DataTable.GetSheet("TestCases").GetParameter("TestCaseID")
          teststepcount = DataTable.GetSheet("TestSteps").GetRowCount
  
          For j = 1 To teststepcount
  
              DataTable.GetSheet("TestSteps").SetCurrentRow (j)
              sid = DataTable.GetSheet("TestSteps").GetParameter("TestCaseID")
  
              If DataTable.GetSheet("TestSteps").GetParameter("TestCaseID") = stestcaseid Then
  
                  Select Case DataTable.Value("Keyword", "TestSteps")
                      Case Browser()
                          sresult = Browser()
                  End Select
  
                  DataTable.Value("Result", "TestSteps") = sresult
              End If
  
              If sresult = "Pass" Then
                  DataTable.Value("Result", "TestCases") = "Pass"
              End If
  
          Next
  
      End If
  
  Next
  
  DataTable.ExportSheet "this is the excel sheet", "TestCases"
  DataTable.ExportSheet "this is the excel sheet", "TestSteps"
  
  Function Browser()
      systemutil.Run "chrome.exe", "www.google.com"
      Browser = "Pass"
  End Function
  </code></pre>