Micro Focus QTP (UFT) Forums
Datatable header inserting error - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Datatable header inserting error (/Thread-Datatable-header-inserting-error)



Datatable header inserting error - Prashanth - 05-21-2013

Hi i am using this code for inserting header of a webtable into datasheet

********************
Code:
datatable.AddSheet("TempStatusHold")
           clcnt=Browser("name:=****").page("title:=****").WebTable("class:=dataGrid").ColumnCount(1)

     For i=1 to clcnt
     columnHeader=Browser("name:=****").page("title:=****").WebTable("class:=dataGrid").GetCellData(1,i)        
      datatable.GetSheet("TempStatusHold").GetParameter(i).Value=columnHeader
      next

************************
The above code is throwing below error

The Sheet.GetParameter operation failed. The specified parameter index value: "1" does not exist in the data sheet.

Line (7):
Code:
"datatable.GetSheet("TempStatusHold").GetParameter(i).Value=columnHeader".



Same code in other function is working fine but how come it is not working in a new test,