Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I change the columnheader(s) in a Datatable ?
#4
Not Solved
Code:
'add a New Colum
DataTable.GetSheet("dtGlobalSheet").AddParameter "NewColumn","Row1Value"

'copy the cells from the old column into the new column
cnt=DataTable.GetRowCount
For i=1 to cnt
       DataTable.SetCurrentRow(i)
       OldVal=DataTable.Value("OldColumn","dtGlobalSheet")
       DataTable.Value("NewColumn","dtGlobalSheet")=OldVal
Next

'delete the old column
DataTable.GetSheet("dtGlobalSheet").DeleteParameter("OldColumn")


Regards
Reply


Messages In This Thread
RE: How do I change the columnheader(s) in a Datatable ? - by kishoreinchennai - 09-04-2008, 07:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How do you Change Run mode mid script? Caleytown 6 7,194 03-25-2021, 08:27 AM
Last Post: RB26578
  [UFT] Change property of object (WpfButton) robertosalemi 2 2,616 11-22-2016, 12:43 PM
Last Post: Ankur
  Dynamic change of name for Webtables prakashreddy 1 2,375 10-25-2014, 09:53 PM
Last Post: supputuri
  How can I change my test folders, globally? atester 0 2,018 10-03-2014, 04:37 PM
Last Post: atester
  JavaDialog change every time i run my test Pkapoor 3 2,984 06-28-2013, 09:27 PM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 1 Guest(s)