GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Testing Tools  >  QTP

 Print  |  
Question:  Copy Datatable Content

Answer: How to copy a datatable content from globalsheet to localsheet (action1)?


August 08, 2009 06:36:18 #4
 qtpdeepak   Member Since: June 2009    Total Comments: 1 

RE: Copy Datatable Content
 

If the User wants to Copy all the Data from all the Rows to a Column in a Separate Sheet. Then the following code will be helpful.

A= DataTable.GetRowCount

DataTable.GetSheet(dtLocalSheet).AddParameter "CopiedData",""

For i=1 to A
 DataTable.SetCurrentRow(i)
 b=DataTable.Value("Values")
 DataTable.Value("CopiedData",dtLocalSheet)=b
Next

     

 

Back To Question